It is currently Mon Aug 26, 2019 7:48 am


All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Nasty bung in src/ldp-out/ldp-vldp-audio.cpp (OGG ERROR)
PostPosted: Tue Sep 16, 2008 5:31 pm 
DAPHNE Bronze Donator
DAPHNE Bronze Donator

Joined: Tue Sep 16, 2008 4:38 pm
Posts: 13
Location: France
Hi,

I think I've found a nasty bug in src/ldp-out/ldp-vldp-audio.cpp.

On the two linux machines I've tried, Daphne refused to play ogg file (OGG ERROR message). It was complaining that the .ogg file didn't have the right number of channel ! :cry:
The ogginfo command was not agree: the .ogg file seems fine...

Next to some investigation, and comparison with classic stdio usage, I've noticed a problem in mmseek() function:
Code:
      case SEEK_SET:
                if (offset < g_audio_filesize)

should be replaced by:
Code:
      case SEEK_SET:
                if (offset <= g_audio_filesize)


Here is the proposed patch which fix the problem:

Code:
--- daphne-1.0.0.old/src/ldp-out/ldp-vldp-audio.cpp     2008-01-29 18:04:07.000000000 +0100
+++ daphne-1.0.0.new/src/ldp-out/ldp-vldp-audio.cpp     2008-09-16 02:49:44.000000000 +0200
@@ -146,7 +146,7 @@
        switch (whence)
        {
        case SEEK_SET:
-               if (offset < g_audio_filesize)
+               if (offset <= g_audio_filesize)
                {
                        // make sure offset is positive so we don't get into trouble
                        if (offset >= 0)



Here is the first lines of daphne-changelog.txt
Quote:
Daphne Changelog
-------------------------

v1.0.1
- Fixed problem where dapinput.ini file wasn't being looked for in the home directory.

v1.0.0
- Fixed OpenGL offset test, and added a check for the bottom row also.
- Fixed sound shutdown bug (possibly crash when shutting down daphne).
- Fixed laireuro driver so that overlay is displayed properly in OpenGL mode.
- Stats are now sent after a game has run, not before. This is because the delay in sending stats was throwing off one of the time
rs.
- Fixed a bunch of unit tests that weren't passing.


Here is my test system info:
Code:
# cat /etc/mandriva-release
Mandriva Linux release 2007.0 (Official) for i586

# uname -a
Linux testme 2.6.17-16mdv #1 SMP Wed Sep 26 16:10:21 EDT 2007 i686 Intel(R) Celeron(R) CPU 2.66GHz GNU/Linux

# rpm -qf /usr/lib/libvorbisfile.so.3
libvorbisfile3-1.1.2-1.2mdv2007.0

# rpm -qf /usr/lib/libvorbis.so.0
libvorbis0-1.1.2-1.2mdv2007.0

# rpm -qf /usr/lib/libogg.so.0
libogg0-1.1.3-1mdk

# gcc --version
gcc (GCC) 4.1.1 20060724 (prerelease) (4.1.1-3.1mdv2007.0)



Note: I've the same problem on a Mandriva Linux release 2008.0 64 bits.



What do you think about it ?

_________________
Arnaud G. GIBERT


Top
Offline Profile  
 
 Post subject:
PostPosted: Tue Sep 16, 2008 8:37 pm 
DAPHNE Creator
DAPHNE Creator

Joined: Sat Jan 20, 2001 1:00 am
Posts: 2120
Location: Salt Lake City,Utah, USA
did making this change fix the problem for you? (I'm assuming it did, I just need to make sure)


Top
Offline Profile  
 
 Post subject:
PostPosted: Tue Sep 16, 2008 9:04 pm 
DAPHNE Bronze Donator
DAPHNE Bronze Donator

Joined: Tue Sep 16, 2008 4:38 pm
Posts: 13
Location: France
Yes, it fix the problem ! :D

_________________
Arnaud G. GIBERT


Top
Offline Profile  
 
 Post subject:
PostPosted: Wed Sep 17, 2008 5:48 pm 
DAPHNE Creator
DAPHNE Creator

Joined: Sat Jan 20, 2001 1:00 am
Posts: 2120
Location: Salt Lake City,Utah, USA
Ok I have added your fix to SVN and the source archive. thx


Top
Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Google [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Theme created StylerBB.net