[vorbis] OGG in RIFF-WAVE (encoding with MSACM)
atom
atom at polychrome.pl
Thu Apr 3 09:01:09 PST 2003
So i'm trying to write an app that enocodes WAV files to "Ogg in a RIFF-WAV"
files. Theese are used in Fruity Loops, and since the software itself does
not have
this feature i wanted to write one myself. The point for it is to save space
when
sharing "zipped loop packages". Such packages contain the samples (WAV) and
the song
file (FLP). At first i wrote just an encoder WAV->Ogg and it worked fine.
But than i
found out that FruityLoops uses ACM so i wanted to support that too.
Attached is a half-working code that encodes a WAV file using ACM.
And here is the problem. The encoded files have either "holes" in them
(that's what Sound Forge shows) or are shorter (that's what Wavelab and
FruityLoops shows).
I've been going through your list and found a suggestion that this might be
due to the nature of Vorbis, that it writes the header information durng the
encode process.
But i don't know how to deal with that, perhaps write some junk to the
encoder before the
actual data, perhaps write NULL data (but i saw someone maention that the
NULL is not possible). But
how much to write or how to find out that i wrote enough. I'm not sure if
i'm thinking the right
way here so please correct me if I'm wrong. The second issue was to achieve
the same thing without the use of ACM.
basicly write the RIFF-WAVE header all the chunks and just "attach" Ogg
Vorbis encoded data, but do the
encoding with libvorbis. Well that came with other problems, because the
decoding will be made with
ACM so I have to know what each "mode" in the ACM engine means. I went
through the source of
vorbis.acm and found some information. I think this can be done, however i
would like your opinion if it is a good
idea.
If someone could help me that would be very nice. The code uses VC++ 6. You
have to link it with
winmm.lib and msacm32.lib. I tried to comment it as much as possbile so it
should be pretty easy to understand.
Hope i was clear enough.
Atom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: atomACM.zip
Type: application/x-zip-compressed
Size: 5729 bytes
Desc: atomACM.zip
Url : http://lists.xiph.org/pipermail/vorbis/attachments/20030403/bf7b9dc5/atomACM.bin
More information about the Vorbis
mailing list