Skip to main content
gamedev.net
🔒 Locked

Sound

Started by Felipe_Ribas 3 replies 500+ views
Original Post
Felipe_Ribas
Felipe_Ribas
Hi, What is the best api to use for sound together with directX (graphics and input) ? For what I can see, direct sound can only read WAV, files, right? So i was looking for something to decode ogg files or even mp3 files. I found the ogg/vorbis decoder but i think is too complex for me. Then i found FMOD. But i dont really know what is the best to use. Does anyone have a suggestion? thanks.
_neutrin0_
_neutrin0_
Ogg/vorbis library provides a decoder, encoder and other utilities for OGG/vorbis sound files. It does not play sound. You need to either stream the decoded sound data or buffer it for play-back using one of following APIs.

FMOD, OpenAL, DirectSound and XACT API are used to play sound. Go for either OpenAL or DirectSound/XACT. Both are equally good, but since you are using DirectX go for the latter.

One more thing, it would be wise to lay off MP3. There are too many controversial patent issues with the format and libraries that use it. Use ogg/vorbis, it is free and equally good (, though some sources say ogg/vorbis is better).
++ My::Game ++
Felipe_Ribas
Felipe_Ribas
Yes, i have preference for ogg format. But what is XACT?

And how can I play ogg files? FMOD ain't good then?

Thanks.
_neutrin0_
_neutrin0_
Quote:
Original post by Felipe_Ribas
Yes, i have preference for ogg format. But what is XACT?

And how can I play ogg files? FMOD ain't good then?

Thanks.


Sorry never used FMOD, can't really comment on how good it is. OpenAL is a free library maintained by Creative and supports full 3D sound and EAX API.
XACT is a new Audio programming API released by Microsoft.

++ My::Game ++
TheAdmiral
TheAdmiral
DirectSound is a low-level buffer-based sound API. Coding was never a part of its contract, so it's nigh on useless for playing MP3s, OGGs and suchlike. Perhaps DirectShow would be of more interest to you.

Anyway, I'd recommend using FMOD. I've not used it myself, but have only ever heard (very) good things about it. FMOD supports OGG decoding.

Admiral
Ring3 Circus - Diary of a programmer, journal of a hacker.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.