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 <p>--------------------------------- Do you Yahoo!? Yahoo! Tax Center - File online by April 15th --- >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@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
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, > crcTwo 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@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@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
On Tuesday 13 April 2004 00:59, 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!8 bit audio is usually unsigned, you're decoding as signed. That's probably your problem. Mike --- >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@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
Mike, Tom! THANK YOU! --------------------------------- Do you Yahoo!? Yahoo! Small Business $15K Web Design Giveaway - Enter today --- >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@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.