•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Game Development section within the Software Development category of DaniWeb, a massive community of 375,200 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,227 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Game Development advertiser:
Views: 460 | Replies: 2
![]() |
•
•
Join Date: Jan 2008
Location: USA East Cost
Posts: 288
Reputation:
Rep Power: 1
Solved Threads: 23
Hey,
So, I'm trying to learn DirectSound, and imagine my delight to learn that DirectSound doesn't have any interface for loading wave files! So MSDN refers me to the DXUT.h file that can be used to load .wav files and even to take care of some DirectSound stuff for you. Neato! Unfortunately, it requires a unicode build instead of multi-byte. Now I'm not exactly sure what that means, but all I know is I don't want to have to cast every string I have with (LPCWSTR).
So, is there some other interface that I can use with DirectSound to load .wav files (or some other sound file format), or some other API I can use all together (would prefer it if I didn't need to switch to a whole other API)? Basically just looking for advice on what's best for playing sounds.
So, I'm trying to learn DirectSound, and imagine my delight to learn that DirectSound doesn't have any interface for loading wave files! So MSDN refers me to the DXUT.h file that can be used to load .wav files and even to take care of some DirectSound stuff for you. Neato! Unfortunately, it requires a unicode build instead of multi-byte. Now I'm not exactly sure what that means, but all I know is I don't want to have to cast every string I have with (LPCWSTR).
So, is there some other interface that I can use with DirectSound to load .wav files (or some other sound file format), or some other API I can use all together (would prefer it if I didn't need to switch to a whole other API)? Basically just looking for advice on what's best for playing sounds.
I'm a student. If my statements seem too absolute, feel free to coat them with "In my opinion..." or "I believe...".
Want to help with a game engine?
Want to help with a game engine?
•
•
Join Date: Jul 2006
Location: Deptford, London
Posts: 916
Reputation:
Rep Power: 5
Solved Threads: 46
Probably not what you want to hear, but the multiplatform SDL library ( simple directmedia layer ) has routines for loading in Wav files. I'm not sure how it holds the data internally, since SDL has its own playback routines aswell, but worth a look maybe.
I never work with platform-specific libs directly, so I can't really help you much more there. Have you looked at the samples in the DX SDK directory though? There's a PlaySound demo, although that might be the technique you're already considering.
I never work with platform-specific libs directly, so I can't really help you much more there. Have you looked at the samples in the DX SDK directory though? There's a PlaySound demo, although that might be the technique you're already considering.
If it only works in Internet Explorer; it doesn't work.
•
•
Join Date: Jan 2008
Location: USA East Cost
Posts: 288
Reputation:
Rep Power: 1
Solved Threads: 23
Ehh... I may switch to another API if I can't figure this out.
I do believe the sample uses the file I was referring to. Does anyone know of any tutorials for DirectSound? I'm curious to see how they will do it. I may trying to switch to more open APIs like OpenGL, because the only real thing I use DirectX for is Direct3D. I do use DirectInput, but I can get key presses with GetAsyncKeyState() and I'm sure there's a way to get mouse input. DirectPlay is deprecated, and I can't really get DirectSound to work.
So anyway, any DirectSound tutorials appreciated.
I do believe the sample uses the file I was referring to. Does anyone know of any tutorials for DirectSound? I'm curious to see how they will do it. I may trying to switch to more open APIs like OpenGL, because the only real thing I use DirectX for is Direct3D. I do use DirectInput, but I can get key presses with GetAsyncKeyState() and I'm sure there's a way to get mouse input. DirectPlay is deprecated, and I can't really get DirectSound to work.
So anyway, any DirectSound tutorials appreciated.
I'm a student. If my statements seem too absolute, feel free to coat them with "In my opinion..." or "I believe...".
Want to help with a game engine?
Want to help with a game engine?
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb Game Development Marketplace
Similar Threads
- Help w/ a book (C++)
Other Threads in the Game Development Forum
- Previous Thread: How do I ... ??!!
- Next Thread: Posted in the wrong thread (Sorry!) - Game Artificial Intelligence help


Linear Mode