| | |
Linux Sound??
Please support our Game Development advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Jul 2005
Posts: 55
Reputation:
Solved Threads: 0
The wonderful power of google...
is this like what your doing?
http://www.daniweb.com/techtalkforum...577#post143577
is this like what your doing?
http://www.daniweb.com/techtalkforum...577#post143577
I don't have a Linux Box, but if there is a program that plays wave files you could call it with system(). Something like
system("WavePlayer cat.wav") May 'the Google' be with you!
•
•
Join Date: Jul 2005
Posts: 55
Reputation:
Solved Threads: 0
•
•
•
•
Originally Posted by vegaseat
I don't have a Linux Box, but if there is a program that plays wave files you could call it with system(). Something like
system("WavePlayer cat.wav")
But what i think i would do is just piggy back off of another program (linux does this all the time) and is what i think vegaseat is refering to. I'd install a program like mpg123 (basic mp3 player) and "exec" the program with the "-q" (quiet) option. I know its not a wav file but mp3's are just better anyway.
That is exactly what I ended up doing. The system call does work in linux. I don't see why it wouldn't as I think it is standard ANSI. However, on my system at least, the system function is in iostream. Maybe it is in both? Anyway the program is call esdplay. so a call to it would look like system("esdplay cat.wav");
While this works and I eventually resorted to it. I think it's cheating. For now, I'm going to leave it as is but in the future, I will use OpenAL which if you didn't figure it out from the name is the audio equivalent to openGL. Thanks for your suggestions everyone.
While this works and I eventually resorted to it. I think it's cheating. For now, I'm going to leave it as is but in the future, I will use OpenAL which if you didn't figure it out from the name is the audio equivalent to openGL. Thanks for your suggestions everyone.
Who is John Galt?
•
•
Join Date: Jul 2005
Posts: 55
Reputation:
Solved Threads: 0
I stand corrected on the "system" function in C. Yeah i just looked it up to make sure. I just realized why i thought that. Not a C or C++ programmer anymore so its been a while since i've written much in it.
As far as feeling like its cheating, I understand why you would feel that way but keep in mind, at least from a linux stand point, using other programs to accomplish a small part of your program is a good idea. It helps keep programs smaller and creation of programs faster. Plus its nice not having to recreate the wheel everytime you need one.
As far as feeling like its cheating, I understand why you would feel that way but keep in mind, at least from a linux stand point, using other programs to accomplish a small part of your program is a good idea. It helps keep programs smaller and creation of programs faster. Plus its nice not having to recreate the wheel everytime you need one.
![]() |
Similar Threads
- Anyone tried Linux Mint? - opinions (Getting Started and Choosing a Distro)
- Difference in hardware for Linux and Windows (*nix Hardware Configuration)
Other Threads in the Game Development Forum
- Previous Thread: Need help with C++ DirectX!
- Next Thread: PLotting a map/graph
| Thread Tools | Search this Thread |
3d advertising ai algorithm ban c++ cambridge camera censorship china competition console development engine fov fpx game gamedevelopment gameprogramming gamer games gaming gauntanamo government graphics idaho in-gameadvertisement intel intellectualproperty l-systems laracroft larrabee lindenmayer live manhunt math mathematics matrix mercenaries microsoft mmorpg modded msn multicore naked news nintendo obama opengl palin physics pirate playstation politics processor projection ps3 rpg search selection software sony stephenhawking stocks studio technology terrorism tombraider uk videogame web wii world-of-warcraft xbox xbox-live xbox360






