Sound System!

Content and general development discussion, including maps, quests, and server code from the development team.
Post Reply
User avatar
Sull
Novice
Novice
Posts: 163
Joined: 26 Apr 2004, 17:56
Location: Quebec,Montreal

Sound System!

Post by Sull » 06 Jun 2004, 04:09

http://sull.homelinux.net/Sound.cpp
http://sull.homelinux.net/Sound.h

Exemple

soundinit(); // to init the sound
soundbgstart("./Sound/BGM/1.ogg",-1); //to play an background music
soundplay("Sound/Effect/bell.wav"); // to play a normal sound
yu can play any format ogg,mp3,wav
yu dont have to worry about mixing chanelle they are automaticely mixed
yu have to get sdl at http://www.libsdl.org/index.php

thx yu!
User avatar
ElvenProgrammer
TMW Adviser
TMW Adviser
Posts: 2526
Joined: 13 Apr 2004, 20:11
Location: Italy
Contact:

Post by ElvenProgrammer » 06 Jun 2004, 08:13

No we have to say thx to you Sull! Good work I'ltry it for the Win32 client.
Now we can play bgm! I was thinking that in this way we are disabling masking sound (which uses allegro routines), but it's not a problem in my opiniion we don't need gui sound. Elsewhere if you think gui sound it's necessary we have to recompile the entire masking lib... :roll:
User avatar
Sull
Novice
Novice
Posts: 163
Joined: 26 Apr 2004, 17:56
Location: Quebec,Montreal

.

Post by Sull » 06 Jun 2004, 08:43

recompile masking library? yu dont have to =)
User avatar
ElvenProgrammer
TMW Adviser
TMW Adviser
Posts: 2526
Joined: 13 Apr 2004, 20:11
Location: Italy
Contact:

Post by ElvenProgrammer » 06 Jun 2004, 09:59

Why not? If we replace all the allegro's sound functions with sdl's ones in masking code I think the lib should be recompiled
User avatar
Sull
Novice
Novice
Posts: 163
Joined: 26 Apr 2004, 17:56
Location: Quebec,Montreal

.

Post by Sull » 06 Jun 2004, 17:50

im using a normal dialog to set the sound with 2 homemade slider we dont have to modifie masking,maybe yu will see it next week =P
User avatar
Shura
Peon
Peon
Posts: 96
Joined: 15 Jun 2004, 02:36

Post by Shura » 20 Jun 2004, 00:51

i wonder if it can play midi or mod as well, since it would save much space compared to even ogg. :?
User avatar
Sull
Novice
Novice
Posts: 163
Joined: 26 Apr 2004, 17:56
Location: Quebec,Montreal

.

Post by Sull » 20 Jun 2004, 04:39

maybe to play a midi yu need timidity++ on linux,and there not an easy task,maybe if yu want to translate .mid in ogg fell free to pm me =)
Guest

Post by Guest » 10 Jul 2004, 02:42

kth5 wrote:i wonder if it can play midi or mod as well, since it would save much space compared to even ogg. :?
If you go 24kbs ogg, or even 8kbs ogg, it's very small and sounds as good as midi atleast.
Post Reply