Trying to play Ogg musics in Simon engine - need .cpp check

General chat related to ScummVM, adventure gaming, and so on.

Moderator: ScummVM Team

Post Reply
SimSaw
Posts: 70
Joined: Tue Nov 01, 2005 11:10 am
Location: Germany
Contact:

Trying to play Ogg musics in Simon engine - need .cpp check

Post by SimSaw »

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
Last edited by SimSaw on Mon Dec 19, 2005 4:33 pm, edited 1 time in total.
User avatar
sev
ScummVM Lead
Posts: 2304
Joined: Wed Sep 21, 2005 1:06 pm
Contact:

Post by sev »

It's very difficult to see what you changed. Please, provide a 'diff -u' command output aka patch file.

Additionally you will need to modify/extend files in sound/ so they will support looping for compressed tracks.


Eugene
SimSaw
Posts: 70
Joined: Tue Nov 01, 2005 11:10 am
Location: Germany
Contact:

Post by SimSaw »

Could anybody tell me how to do this exactly? I'm not used with diff. Maybe tell me by PM. Thanks!
clem
Posts: 2159
Joined: Mon Oct 31, 2005 11:14 am

Post by clem »

ask your "friend"
SimSaw
Posts: 70
Joined: Tue Nov 01, 2005 11:10 am
Location: Germany
Contact:

Post by SimSaw »

Should that be an insult to my friend because this code is so dirty?
If he knew it, I wouldn't ask here.
clem
Posts: 2159
Joined: Mon Oct 31, 2005 11:14 am

Post by clem »

no offense, but I think explaining a compiler tool is out of scope for the ScummVM forum
User avatar
sev
ScummVM Lead
Posts: 2304
Joined: Wed Sep 21, 2005 1:06 pm
Contact:

Post by sev »

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.
No, not dirty. Just it's difficult to find those 10 lines of code in 1000.
  • * Copy simon directory into something simon.old
    * Alter files in simon directory
    * Do:

    Code: Select all

      diff -u -r simon.old simon >kewl.patch
    
    * Attach that kewl.patch file.

Eugene
SimSaw
Posts: 70
Joined: Tue Nov 01, 2005 11:10 am
Location: Germany
Contact:

Post by SimSaw »

Thanks.
I've updated now my first post to include the link to the patch file.
User avatar
sev
ScummVM Lead
Posts: 2304
Joined: Wed Sep 21, 2005 1:06 pm
Contact:

Post by sev »

SimSaw wrote:Thanks.
I've updated now my first post to include the link to the patch file.
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?


Eugene
Post Reply