My favorites | Sign in
Logo
                
New issue | Search
for
| Advanced search | Search tips
Issue 49: OSS output plays very slow (cygwin only)
1 person starred this issue and may be notified of changes. Back to list
Status:  Accepted
Owner:  ----
Type-Defect
Priority-Medium


Sign in to add a comment
 
Reported by yselkow...@gmail.com, Feb 24, 2009
Having built qmmp-0.2.3 for Cygwin, where ALSA is not available, using the
OSS output plugin causes the file to play at ~1/8 speed.  I'm willing to
try any patches you can provide and report back the results.

Comment 1 by trialuser02, Feb 25, 2009
Try svn version: 
svn checkout http://qmmp.googlecode.com/svn/branches/qmmp-0.2/ qmmp-0.2 
Comment 2 by yselkow...@gmail.com, Feb 25, 2009
Tried r809 on the branch, same results.
Comment 3 by trialuser02, Feb 28, 2009
OK, try another player. If qmmp only has this problem, show its output during
starting playback.
Comment 4 by yselkow...@gmail.com, Mar 01, 2009
> OK, try another player.

I have dozens of multimedia programs on this computer, and all work fine with OSS
audio output.

> If qmmp only has this problem, show its output during starting playback.

OutputOSS: uninitialize
DecoderMAD: deleting input_buf
DecoderMAD: deleting output_buf
SoundCore: creating decoder
ok
SoundCore: decoder was created successfully
DecoderMAD: 152 bytes skipped
DecoderMAD: Fixed rate detected
DecoderMAD: Total time: 12
DecoderMAD: 152 bytes skipped

Comment 5 by trialuser02, Mar 02, 2009
OK, try r818. If the problem still exists, show output again.
Comment 6 by yselkow...@gmail.com, Mar 02, 2009
I appreciate your persistence.  I build r818 from the branch, the results are still
the same, here's the output with a 12s MP3 which played at 1/8 speed:

SoundCore: creating decoder
ok
SoundCore: decoder was created successfully
DecoderMAD: 152 bytes skipped
DecoderMAD: Fixed rate detected
DecoderMAD: Total time: 12
OutputOSS: frequency=44100, channels=2, bits=16
DecoderMAD: 152 bytes skipped

With a 68s Ogg/Vorbis file, the speed was approx. 1/4:

SoundCore: creating decoder
ok
SoundCore: decoder was created successfully
DecoderVorbis: initialize
OutputOSS: frequency=44100, channels=1, bits=16
file info:
ARTIST =
TITLE =
ALBUM =
COMMENT =
GENRE = Other
YEAR = 0
TRACK = 0
LENGTH = 68

Testing a few different files, the speed seems to be 1/(4 * channels); 1/4 for mono,
1/8 for stereo.  Does that help?

Comment 7 by trialuser02, Mar 02, 2009
OK, try again. I hope, it shows more useful info now.
Comment 8 by yselkow...@gmail.com, Mar 02, 2009
Sorry, output and results are exactly the same.
Comment 9 by trialuser02, Mar 02, 2009
May be qWarning() doesn't show messages under windows. Find outputoss.cpp file and
change all "qWarning" functions to "qDebug". Than try again. I consider, "/dev/oss"
doesn't support 44kHz.
Comment 10 by yselkow...@gmail.com, Mar 02, 2009
Cygwin != Windows, and qWarning does show messages (I added one unconditionally to
verify).  I assure you that these files do play on other audio players with their OSS
backends.
Comment 11 by trialuser02, Mar 02, 2009
OK, yet another attempt. Try to remove this lines from outputoss.cpp

    int flags;
    if ((flags = fcntl(m_audio_fd, F_GETFL, 0)) > 0)
    {
        flags &= O_NDELAY;
        fcntl(m_audio_fd, F_SETFL, flags);
    }
Comment 12 by yselkow...@gmail.com, Mar 02, 2009
Sorry, no change. :-(
Comment 13 by trialuser02, Mar 03, 2009
OK, try to increase sample rate. Change "m_frequency = freq" to something like
"m_frequency = freq*4" or 8. Does it change anything? 
Status:
Comment 14 by yselkow...@gmail.com, Mar 03, 2009
Using freq*4, I got an additional message:

OutputOSS: can't set frequency, using 176400 instead

With freq*8, the message was 352800.  That comes from the if(m_frequency != freq)
conditional which you added.

Playback was still as slow.
Comment 15 by trialuser02, Mar 03, 2009
Looks like "/dev/dsp" doesn't use samplerate settings. And I can't find any
differences in oss code between mpd, audacious and qmmp. 
I consider, this is last difference: 
- open(m_audio_device.toAscii(), O_WRONLY, 0);
+ open(m_audio_device.toAscii(), O_WRONLY);
Comment 16 by yselkow...@gmail.com, Mar 03, 2009
Looking at the Cygwin sources, I see now that SNDCTL_DSP_GETODELAY is not supported.
 GStreamer and PulseAudio use SNDCTL_DSP_GETOSPACE as a backup.

If you're out of ideas, then I'll try to figure this out myself, and if I'm
successful, I'll propose a patch here.  I appreciate your efforts nevertheless.
Comment 17 by trialuser02, Mar 04, 2009
Yes, you are right. I haven,t more ideas. So I'm waiting for your patches. 
Status: New
Comment 18 by trialuser02, Apr 05, 2009
(No comment was entered for this change.)
Summary: OSS output plays very slow (cygwin only)
Status: Accepted
Sign in to add a comment

Hosted by Google Code