A friend tried to make the Simon engine able to play back ogg as music. It should also loop. But unfortunately he doesn't know C++ very well (actually he works with C) and the program crashs. Could anybody check what's wrong here?
http://simsaw.pytalhost.de/simon.cpp
http://simsaw.pytalhost.de/sound.cpp
http://simsaw.pytalhost.de/sound.h
UPDATE:
I've finally added the patch file created with diff -u here:
http://simsaw.pytalhost.de/kewl.patch
Trying to play Ogg musics in Simon engine - need .cpp check
Moderator: ScummVM Team
Trying to play Ogg musics in Simon engine - need .cpp check
Last edited by SimSaw on Mon Dec 19, 2005 4:33 pm, edited 1 time in total.
No, not dirty. Just it's difficult to find those 10 lines of code in 1000.SimSaw wrote:Should that be an insult to my friend because this code is so dirty?
If he knew it, I wouldn't ask here.
- * Copy simon directory into something simon.old
* Alter files in simon directory
* Do:* Attach that kewl.patch file.Code: Select all
diff -u -r simon.old simon >kewl.patch
Eugene
The patch is... errr.... restricted. Why break everything in the sake of a single feature? Proper solution would be to check existence of .ogg file and then playing it if it's present. Also why you friend uses SFX channel for music instead of Music channel? Another thing is "nice" new class name, i.e. HackedMusic. Why not DigitalMusic or something?SimSaw wrote:Thanks.
I've updated now my first post to include the link to the patch file.
Eugene