2

I have one problem with recording sound with OpenAL library. I read second answer on this question: Recording Audio with OpenAL . But I dont understand, how I can change buffer size. If I change SSIZE, and buffer size to, for example, 441, the program is crashing. If you know answer of this question, please explain me, how I can get 1 ms buffer with sampling rate 96000Hz. (96 elements in array, with 1 channel, 8bit). Please help me.

Added: I change this:

const int SRATE = 96000;
const int SSIZE = 96;

ALbyte buffer[SSIZE];
ALint sample;

and

AL_FORMAT_STEREO16

to

AL_FORMAT_MONO8

and this gave me this error: enter image description here

Community
  • 1
  • 1
Alexander Mashin
  • 693
  • 3
  • 14
  • 34
  • 3
    Show the code you've written ... also bear in mind that a 1ms buffer is unlikely to be possible due to overheads – Goz Dec 23 '12 at 15:10

1 Answers1

1

I would guess that the number of samples returned by alcGetIntegerv is larger than SSIZE ...

Goz
  • 61,365
  • 24
  • 124
  • 204