mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 803881: Fix wrong number of samples for webrtc media unit tests r=ekr
This commit is contained in:
parent
340b17efe3
commit
e20b9edb57
@ -270,13 +270,14 @@ void AudioSendAndReceive::GenerateAndReadSamples()
|
||||
int16_t audioOutput[PLAYOUT_SAMPLE_LENGTH];
|
||||
short* inbuf;
|
||||
int sampleLengthDecoded = 0;
|
||||
int SAMPLES = PLAYOUT_SAMPLE_FREQUENCY * 10; //10 milliseconds
|
||||
int SAMPLES = (PLAYOUT_SAMPLE_FREQUENCY * 10)/1000; //10 milliseconds
|
||||
int CHANNELS = 1; //mono audio
|
||||
int sampleLengthInBytes = PLAYOUT_SAMPLE_LENGTH * sizeof(short);
|
||||
int sampleLengthInBytes = sizeof(audioInput);
|
||||
//generated audio buffer
|
||||
inbuf = (short *)moz_xmalloc(sizeof(short)*SAMPLES*CHANNELS);
|
||||
memset(audioInput,0,sampleLengthInBytes);
|
||||
memset(audioOutput,0,sampleLengthInBytes);
|
||||
MOZ_ASSERT(SAMPLES <= PLAYOUT_SAMPLE_LENGTH);
|
||||
|
||||
FILE* inFile = fopen( iFile.c_str(), "wb+");
|
||||
if(!inFile) {
|
||||
|
Loading…
Reference in New Issue
Block a user