Displaying 11 results from an estimated 11 matches for "byteswritten".
Did you mean:
bytes_written
2007 Nov 04
3
WaveIn/WaveOut and Speex
...the mic, I send it to Speex in a Char buffer.
It looks something like this:
Encode(char* inBuffer, DWORD bufferLength)
...
float* input = new float[frameSize];
ZeroMemory(input, frameSize);
...
for( )
{
input[..] = inBuffer[..];
}
...
speex_encode(enc_state, input, &bits);
int bytesWritten = speex_bits_nbytes(&bits);
speex_bits_write(&bits, encBuffer, bytesWritten);
Then, my decoding routine accepts the char buffer that was encoded with
Speex:
Decode(char* encBuffer, DWORD bufferLength)
...
float* output = new float[frameSize];
...
speex_bits_read_from(&...
2004 Aug 06
1
About reducing noise..
...bBytes, &bytesRead, NULL);
totalBytesRead += bytesRead;
speex_bits_read_from(&bits, cbits, nbBytes);
speex_decode(state, &bits, out);
for( i=0; i <FRAME_SIZE; i++)
buf[i] = (char)out[i];
// write to file
WriteFile(file2, buf, FRAME_SIZE, &bytesWritten, NULL);
totalBytesWritten+= bytesWritten;
}
I am using wave api for capturing and playing back sound.
Please guide me in this problem.
Regards,
Ali Naqi Shaheen,
<p>--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To...
2007 Nov 04
2
WaveIn/WaveOut and Speex
...ufferLength)
>
> ...
>
> float* input = new float[frameSize];
>
> ZeroMemory(input, frameSize);
>
> ...
>
> for( )
>
> {
>
> input[..] = inBuffer[..];
>
> }
>
> ...
>
> speex_encode(enc_state, input, &bits);
>
> int bytesWritten = speex_bits_nbytes(&bits);
>
> speex_bits_write(&bits, encBuffer, bytesWritten);
>
>
>
>
>
>
>
> Then, my decoding routine accepts the char buffer that was encoded with
> Speex:
>
>
>
> Decode(char* encBuffer, DWORD bufferLength)...
2006 May 21
2
Re: High pitched whine with Speex
...ingFrameSampleCount);
DECODING INIT:
channel->dec_state=speex_decoder_init(&speex_nb_mode);
speex_decoder_ctl(channel->dec_state, SPEEX_GET_FRAME_SIZE,
&channel->speexIncomingFrameSampleCount);
ENCODING:
speex_encode(channel->enc_state, (float *) inputBuffer, &speexBits);
bytesWritten = speex_bits_write(&speexBits, tempOutput+1, 2048-1);
DECODING:
speex_bits_read_from(&speexBits, (char*)(packet->data+1), packet->length-1);
speex_decode(channel->dec_state, &speexBits, (float*)tempOutput);
That's pretty much the extent of the Speex code. For the output,...
2007 Nov 04
0
WaveIn/WaveOut and Speex
...ufferLength)
>
> ...
>
> float* input = new float[frameSize];
>
> ZeroMemory(input, frameSize);
>
> ...
>
> for( )
>
> {
>
> input[..] = inBuffer[..];
>
> }
>
> ...
>
> speex_encode(enc_state, input, &bits);
>
> int bytesWritten = speex_bits_nbytes(&bits);
>
> speex_bits_write(&bits, encBuffer, bytesWritten);
>
>
>
>
>
>
>
> Then, my decoding routine accepts the char buffer that was encoded with
> Speex:
>
>
>
> Decode(char* encBuffer, DWORD bufferLength)...
2007 Nov 04
0
WaveIn/WaveOut and Speex
...e];
>>
>> ZeroMemory(input, frameSize);
>>
>> ...
>>
>> for( )
>>
>> {
>>
>> input[..] = inBuffer[..];
>>
>> }
>>
>> ...
>>
>> speex_encode(enc_state, input, &bits);
>>
>> int bytesWritten = speex_bits_nbytes(&bits);
>>
>> speex_bits_write(&bits, encBuffer, bytesWritten);
>>
>>
>>
>>
>>
>>
>>
>> Then, my decoding routine accepts the char buffer that was encoded
>> with Speex:
>>
>>
>>...
2007 Nov 05
0
Fw: RE: WaveIn/WaveOut and Speex
...e];
>>
>> ZeroMemory(input, frameSize);
>>
>> ...
>>
>> for( )
>>
>> {
>>
>> input[..] = inBuffer[..];
>>
>> }
>>
>> ...
>>
>> speex_encode(enc_state, input, &bits);
>>
>> int bytesWritten = speex_bits_nbytes(&bits);
>>
>> speex_bits_write(&bits, encBuffer, bytesWritten);
>>
>>
>>
>>
>>
>>
>>
>> Then, my decoding routine accepts the char buffer that was encoded
>> with Speex:
>>
>>
>>...
2006 May 21
3
Re: High pitched whine with Speex
..._state=speex_decoder_init(&speex_nb_mode);
>> speex_decoder_ctl(channel->dec_state, SPEEX_GET_FRAME_SIZE,
>> &channel->speexIncomingFrameSampleCount);
>>
>> ENCODING:
>> speex_encode(channel->enc_state, (float *) inputBuffer, &speexBits);
>> bytesWritten = speex_bits_write(&speexBits, tempOutput+1, 2048-1);
>>
>> DECODING:
>> speex_bits_read_from(&speexBits, (char*)(packet->data+1),
>> packet->length-1);
>> speex_decode(channel->dec_state, &speexBits, (float*)tempOutput);
>>
>> That...
2007 Nov 05
2
WaveIn/WaveOut and Speex
...e];
>>
>> ZeroMemory(input, frameSize);
>>
>> ...
>>
>> for( )
>>
>> {
>>
>> input[..] = inBuffer[..];
>>
>> }
>>
>> ...
>>
>> speex_encode(enc_state, input, &bits);
>>
>> int bytesWritten = speex_bits_nbytes(&bits);
>>
>> speex_bits_write(&bits, encBuffer, bytesWritten);
>>
>>
>>
>>
>>
>>
>>
>> Then, my decoding routine accepts the char buffer that was encoded
>> with Speex:
>>
>>
>>...
2006 May 21
0
Re: High pitched whine with Speex
...T:
> channel->dec_state=speex_decoder_init(&speex_nb_mode);
> speex_decoder_ctl(channel->dec_state, SPEEX_GET_FRAME_SIZE,
> &channel->speexIncomingFrameSampleCount);
>
> ENCODING:
> speex_encode(channel->enc_state, (float *) inputBuffer, &speexBits);
> bytesWritten = speex_bits_write(&speexBits, tempOutput+1, 2048-1);
>
> DECODING:
> speex_bits_read_from(&speexBits, (char*)(packet->data+1), packet-
> >length-1);
> speex_decode(channel->dec_state, &speexBits, (float*)tempOutput);
>
> That's pretty much the extent...
2006 Oct 09
1
Vorbis primitive API examples (LONG)
..._pcmout(vd, &pcm);
/* Interleaver for output PCM */
for(ii=0; ii<pcmSamples; ++ii) {
for(jj=0; jj<numChannels; ++jj) {
ogg_int32_t *srcChannelArray = pcm[jj];
ogg_int32_t srcValue = srcChannelArray[ii];
short dstValue = CLIP_TO_15(srcValue>>9);
long bytesWritten = fwrite(&dstValue, 2, 1, stdout);
}
}
/* Let the decoder know how many samples we actually consumed */
vorbis_synthesis_read(vd, pcmSamples);
}
}
}
}
} /* Packet valid */
} /* Iterates over packets */
} /* Page system has been initial...