[vorbis-dev] Decoding with 8 bit-samples

Tom Felker tcfelker at mtco.com
Mon Apr 12 08:37:46 PDT 2004



On Monday 12 April 2004 9:59 am, Crock Real wrote:
> Hi!
>
> I'd like to make a stereo 8-bit wav file
> from a stereo (16 bit) ogg vorbis file
> (in delphi, with the vorbisfile).
>
> I use:
>
>     ret := ov_open_callbacks(filein,vf,nil,0,ops_callbacks);
>     if ret = 0 Then
>     begin
>       fileOut :=  TFileStream.Create(savedlg.FileName,fmCreate);
>       repeat
>         ret := ov_read(VF, pcmout, BufferSize, 0, 1, 1, nil); //'cause of
> the 8-bit fileOut.Write(pcmout,ret);
>       until ret = 0;
>     end;
>
> The result will be cracking.... etc (will be unrecognizable). Why?
> If I decode into 16-bit samples, everything is ok!
>
> Thank you for your reply,
> crc

Two things to check - first, play with the signedness, because if the player 
is expecting unsigned and gets signed, it will sound ugly.  Second, make sure 
the output file is in binary mode.


-- 
Tom Felker, <tcfelker at mtco.com>
<http://vlevel.sourceforge.net> - Stop fiddling with the volume knob.

Alchemists became chemists when they stopped keeping secrets.
--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.




More information about the Vorbis-dev mailing list