Sound System!

Content and general development discussion, including quest scripts and server code. TMW Classic is a project comprising the Legacy tmwAthena server & the designated improved engine server based on evolHercules.


Forum rules

This forum houses many years of development, tracing back to some of the earliest posts that exist on the board.

Its current use is for the continued development of the server and game it has always served: TMW Classic.

Post Reply
User avatar
Sull
Novice
Novice
Posts: 163
Joined: 26 Apr 2004, 16:56
Location: Quebec,Montreal

Sound System!

Post by Sull »

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
Founder
Founder
Posts: 2526
Joined: 13 Apr 2004, 19:11
Location: Italy
Contact:

Post by ElvenProgrammer »

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, 16:56
Location: Quebec,Montreal

.

Post by Sull »

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

Post by ElvenProgrammer »

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, 16:56
Location: Quebec,Montreal

.

Post by Sull »

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
Novice
Novice
Posts: 96
Joined: 15 Jun 2004, 01:36

Post by Shura »

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, 16:56
Location: Quebec,Montreal

.

Post by Sull »

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 »

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