User Name Password Register
DaniWeb IT Discussion Community
All
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 422,396 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 4,792 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: Programming Forums
Views: 551 | Replies: 2
Reply
Join Date: Jan 2008
Location: USA East Cost
Posts: 389
Reputation: CoolGamer48 is on a distinguished road 
Rep Power: 1
Solved Threads: 37
CoolGamer48's Avatar
CoolGamer48 CoolGamer48 is offline Offline
Posting Whiz

Using DirectSound w/o DXUT.h

  #1  
Apr 27th, 2008
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.
I'm a student. If my statements seem too absolute, feel free to coat them with "In my opinion..." or "I believe...".
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jul 2006
Location: Deptford, London
Posts: 954
Reputation: MattEvans has a spectacular aura about MattEvans has a spectacular aura about 
Rep Power: 5
Solved Threads: 48
Moderator
Featured Poster
MattEvans's Avatar
MattEvans MattEvans is online now Online
Posting Shark

Re: Using DirectSound w/o DXUT.h

  #2  
Apr 27th, 2008
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.
If it only works in Internet Explorer; it doesn't work.
Reply With Quote  
Join Date: Jan 2008
Location: USA East Cost
Posts: 389
Reputation: CoolGamer48 is on a distinguished road 
Rep Power: 1
Solved Threads: 37
CoolGamer48's Avatar
CoolGamer48 CoolGamer48 is offline Offline
Posting Whiz

Re: Using DirectSound w/o DXUT.h

  #3  
Apr 29th, 2008
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'm a student. If my statements seem too absolute, feel free to coat them with "In my opinion..." or "I believe...".
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Game Development Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the Game Development Forum

All times are GMT -4. The time now is 9:02 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC