search for: samplesarray

Displaying 5 results from an estimated 5 matches for "samplesarray".

Did you mean: samplearray
2004 Sep 10
1
trying to write encoder - need help!
...t all the appropriate parameters on the encoder and then call init(). Everything appears to be ok. I don't know how to properly convert from char *data to the FLAC__int32 *[] requested by the process function. I think this is where my problem is. If I call process() like this: FLAC__int32 *samplesArray[1] = { (FLAC__int32 *)data }; // data size if 4096 bytes if (!process(samplesArray, 1024)) die("return false"); it appears to encode ok, but when I play the flac file, it plays at twice the normal speed. I can cheat and tell the encoder that the sample rate is really 8000 Hz when in re...
2013 Feb 12
0
Speexdec says: 'This doesn't look like a Speex file' (am I missing headers?)
...; nextSampleStartPosition += sampleSize; [_intermediateSampleBuffer addObject:singleSampleData]; // we put samples here until it's enough for the frame if (_intermediateSampleBuffer.count == samplesPerFrame) { speex_bits_reset(&bits); short samplesArray[samplesPerFrame]; // c-array which will get samples from _intermediateSampleBuffer for (int j = 0; j < samplesPerFrame; j++) { samplesArray[j] = (short)[(NSData *)[_intermediateSampleBuffer objectAtIndex:j] bytes]; } [_intermediateSampleBuffe...
2013 Feb 12
0
Speexdec says: 'This doesn't look like a Speex file' (am I missing headers?).
...nextSampleStartPosition += sampleSize; [_intermediateSampleBuffer addObject:singleSampleData]; // we put samples here until it's enough for the frame if (_intermediateSampleBuffer.count == samplesPerFrame) { speex_bits_reset(&bits); short samplesArray[samplesPerFrame]; // c-array which will get samples from _intermediateSampleBuffer for (int j = 0; j < samplesPerFrame; j++) { samplesArray[j] = (short)[(NSData *)[_intermediateSampleBuffer objectAtIndex:j] bytes]; } [_intermediateSampleBuffe...
2013 Feb 12
0
Speexdec says: 'This doesn't look like a Speex file' (am I missing headers?).
...; nextSampleStartPosition += sampleSize; [_intermediateSampleBuffer addObject:singleSampleData]; // we put samples here until it's enough for the frame if (_intermediateSampleBuffer.count == samplesPerFrame) { speex_bits_reset(&bits); short samplesArray[samplesPerFrame]; // c-array which will get samples from _intermediateSampleBuffer for (int j = 0; j < samplesPerFrame; j++) { samplesArray[j] = (short)[(NSData *)[_intermediateSampleBuffer objectAtIndex:j] bytes]; } [_intermediateSampleBuffe...
2013 Feb 12
0
Speexdec says: 'This doesn't look like a Speex file' (am I missing headers?)
...nextSampleStartPosition += sampleSize; [_intermediateSampleBuffer addObject:singleSampleData]; // we put samples here until it's enough for the frame if (_intermediateSampleBuffer.count == samplesPerFrame) { speex_bits_reset(&bits); short samplesArray[samplesPerFrame]; // c-array which will get samples from _intermediateSampleBuffer for (int j = 0; j < samplesPerFrame; j++) { samplesArray[j] = (short)[(NSData *)[_intermediateSampleBuffer objectAtIndex:j] bytes]; } [_intermediateSampleBuffe...