SFML community forums
Help => Audio => Topic started by: kaB00M on October 27, 2012, 06:50:12 pm
-
I know this is not a direct SFML question, but I was wondering what is the best way to compress music.
Files of type .wav can be extremely large and openal32 doesn't play .mid, for example.
Also, I notice that some projects don't even include the music as a different .wav file. It seems they include the audio in a .dat file along with the graphics. How is this possible?
Thank You.
-
Why don't you use the ogg/vorbis format?
-
Also, I notice that some projects don't even include the music as a different .wav file. It seems they include the audio in a .dat file along with the graphics. How is this possible?
They somehow pack it. A common way is to use zlib and decompress the contained data at runtime. There are even some libraries that can 'stream' it directly from the zipped file.
Others might have defined their own packing 'protocol' and then wrote a loader for it.
-
Why don't you use the ogg/vorbis format?
Oh. ??? I was under the impression that .ogg files where for short sound snippets, not music. Thanks for the help! :)
They somehow pack it. A common way is to use zlib and decompress the contained data at runtime. There are even some libraries that can 'stream' it directly from the zipped file.
Others might have defined their own packing 'protocol' and then wrote a loader for it.
Interesting.
Thank you all.
-
I was under the impression that .ogg files where for short sound snippets, not music.
This is exactly the contrary, they are for musics and not for short sounds.
-
Why don't you use the ogg/vorbis format?
Oh. ??? I was under the impression that .ogg files where for short sound snippets, not music. Thanks for the help! :)
That's the exact opposite of what they're for. OGG is for music and longer samples, WAV is for short samples like sound effects.