|
-
February 4th, 2007, 06:27 PM
#1
PlaySound() problem
Hey,
I'm currently writing a sound program that will work with several wav files and at the same time play the mix of them all (say a studio mix).
This file I want to play is a wav file and I can play it using PlaySound() in windows.h. And this works for the first about 1 minute 23 for a mono file and 37 seconds for a stereo file (with double the memory for each sample) at which point the audio playing just stops.
I believe the problem is, some research has told me, that because of the way PlaySound() uses buffers, it can only play so much of a file (dictated by size).
Could anyone tell me a function or some way to basically just play this song the whole way through? It's quite a large file - around 40-50mb.
Thanks,
Conor.
-
February 5th, 2007, 07:24 AM
#2
Re: PlaySound() problem
Check out the sample codes of DirectSound about Stream Data.
-
February 5th, 2007, 07:30 AM
#3
Re: PlaySound() problem
have a look in MSDN for MCIWnd Functions. Everything is there.
Thanx
-
February 5th, 2007, 01:14 PM
#4
Re: PlaySound() problem
using the mciSendString will work
mciSendString("open filename.wav type waveaudio as alias mywav");
mciSendString("play mywav wait");
-
February 5th, 2007, 10:49 PM
#5
Re: PlaySound() problem
hi Conor!.
You can try to use the FMOD Sound System librarys. There are free for use as you use you program for non comercial issues. It is audio engine that we can use using a interface defines in the includes files .h. You can program using classes (like c++) or folowing the procedural paradigm (like c).
It's no very dificul to play just a sound, and you can do all the cool stuff you want...try it..
the web site of FMOD is:
http://www.fmod.org/
I hope that's help!...and you can't forget of the nice (but simple) playSound function...
-
February 5th, 2007, 11:09 PM
#6
Re: PlaySound() problem
Just thought I'd make a useless comment, and mention that FMOD::Sound::getOpenState only completely works on streaming sounds. This wasn't clear from the documentation and I recently ran into that problem.
Windows XP, Visual Studio 2008, SVN
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|