LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices

Reply
 
Search this Thread
Old 09-13-2008, 09:22 AM   #1
lugoteehalt
Senior Member
 
Registered: Sep 2003
Location: UK
Distribution: Debian
Posts: 1,215
Blog Entries: 2

Rep: Reputation: 49
noatun and desktop sounds: big delay between picture and sound?


Played a .ogv film on noatun and there was a big delay (?latency) between the picture and the sound: the sound lagged the picture.

This is using arts on KDE.

The desktop noises, such a breaking glass for an error, also grotesqly lag the appearance of the dialog box.

Is alsa really useable if it has this degree of latency?

Does anyone know a way to reduce the latency, preferably to zero? Great thanks any help.
 
Old 09-14-2008, 01:15 AM   #2
elprawn
Member
 
Registered: Feb 2005
Distribution: Gentoo 2008
Posts: 138

Rep: Reputation: 15
Edit Please Delete

Last edited by elprawn; 09-14-2008 at 01:17 AM.
 
Old 09-14-2008, 01:29 AM   #3
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,036

Rep: Reputation: 373Reputation: 373Reputation: 373Reputation: 373
Disable arts completely, and use an external player for system sounds, like "mpg123" or "play".

Unfortunately, I think that noatun depends on arts, so you will need to change the player of choice, I guess.
 
Old 09-15-2008, 05:26 AM   #4
lugoteehalt
Senior Member
 
Registered: Sep 2003
Location: UK
Distribution: Debian
Posts: 1,215
Blog Entries: 2

Original Poster
Rep: Reputation: 49
Thanks. I don't know if this is going off topic but with analog television on tvtime or kdetv they give no sound but I get some with: sox -c 1 r 32000 -t alsa hw:1 -c 2 -t alsa hw:0 (where c is the number of channels and r is the rate).

If I try to get stereo with c=2 the sound is very distorted the degree of distortion depending on the rate, -r. Incidentally the rate from the tv card should be 48000 according to ?/proc/sound.

'play' is sox isn't it, so presumably no stereo?? But I'd never heard of mpg123 so will try that with joy in my heart.
 
Old 09-16-2008, 02:26 AM   #5
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,036

Rep: Reputation: 373Reputation: 373Reputation: 373Reputation: 373
Quote:
Originally Posted by lugoteehalt View Post
Thanks. I don't know if this is going off topic but with analog television on tvtime or kdetv they give no sound but I get some with: sox -c 1 r 32000 -t alsa hw:1 -c 2 -t alsa hw:0 (where c is the number of channels and r is the rate).

If I try to get stereo with c=2 the sound is very distorted the degree of distortion depending on the rate, -r. Incidentally the rate from the tv card should be 48000 according to ?/proc/sound.

'play' is sox isn't it, so presumably no stereo?? But I'd never heard of mpg123 so will try that with joy in my heart.
play is sox, yes. However I never experienced any problem with it to play stereo files or whatever else. I had some problems with distorted sound on via chipsets, long ago (it might have been fixed at driver level by this time, I don't know).

There are a bazillion sound players for command line, so you shouldn't have a problem to find a replacement if sox doesn't suit you. You can always use plain mplayer, that will play almost anything, however it's a bit of an overkill for just system sounds (though they are usually short enough so it will not live long in your ram).
 
Old 09-17-2008, 10:04 AM   #6
lugoteehalt
Senior Member
 
Registered: Sep 2003
Location: UK
Distribution: Debian
Posts: 1,215
Blog Entries: 2

Original Poster
Rep: Reputation: 49
Tried using 'play' and this worked:
Code:
$ play -c 2 -r 34000 -t ossdsp /dev/dsp1
(The ossdsp gives play access to /dev/dsp. Have alsa installed, not oss; so this is presumably oss emulation.)
So this is giving stereo presumably.

The problem is the latency is *just* adequate or *just* inadequate, depending on how I'm feeling.

There is also the problem that the latency gets worse with time, so that after a few hours the sound lags the vision by a few seconds. Tried to remedy this with speed 1.01 which possibly makes it play 1% faster but this introduces some distortion.

You couldn't suggest a sox replacement could you? I have little experience with sound problems. Perhaps arts or pulseaudio could be used??

Mysteriously my last post has failed to appear.
 
Old 09-17-2008, 11:41 PM   #7
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,036

Rep: Reputation: 373Reputation: 373Reputation: 373Reputation: 373
arts or pulseaudio operate on top of alsa. So, if the problem is in alsa, it will still be there. If the problem is your application (sox), then arts/pulseaudio is not going to help you.

By the way, arts has a very bad record in which regards latency. And it has been completely unsupported since many years ago, completely abandoned. I am not sure it's still working on kde 3.5.10, and it is not shipped in kde 4.x at all. It's not the best moment to start using arts, to tell the truth.

Sox is just a command line player, if you want substitutes for it there are lots of small programs to play many file formats, you can use mplayer as well. It really depends on what do you exactly need. Sox has also some editing capabilities, and that's harder to find on a command line tool.

Code:
$ ls /usr/bin/*play*
/usr/bin/aplay            /usr/bin/lavplay    /usr/bin/playSIP
/usr/bin/aplaymidi        /usr/bin/lqtplay    /usr/bin/playsound
/usr/bin/cdda-player      /usr/bin/mplayer    /usr/bin/playsound_simple
/usr/bin/display          /usr/bin/pitchplay  /usr/bin/play_title
/usr/bin/display-buttons  /usr/bin/play       /usr/bin/scriptreplay
/usr/bin/display-coords   /usr/bin/plaympeg   /usr/bin/sndfile-play
/usr/bin/ffplay           /usr/bin/play-q     /usr/bin/yuvplay

Last edited by i92guboj; 09-17-2008 at 11:42 PM.
 
Old 09-18-2008, 01:12 PM   #8
lugoteehalt
Senior Member
 
Registered: Sep 2003
Location: UK
Distribution: Debian
Posts: 1,215
Blog Entries: 2

Original Poster
Rep: Reputation: 49
Using the ossdsp ?'pseudo file type' a la play in
Code:
$ play -c 2 -r 34000 -t ossdsp /dev/dsp1
suggested:
Code:
$ sox -q -V -w -s -c 2 -r 32000 -t ossdsp /dev/dsp1 -c 2 -r 44100 -t alsa hw:0
which works and has acceptable latency.

So problem appears to be solved for Peak card 138508AGPK/DVB-T PCI card. Thanks greatly.

Last edited by lugoteehalt; 09-18-2008 at 01:19 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
no stereo sound in fedora 8 kde 3.5 after using noatun xcorsary Linux - Newbie 3 04-24-2008 05:41 PM
LXer: Supply the big picture with Google Map Image Cutter LXer Syndicated Linux News 0 06-04-2007 11:31 PM
Big delay stablishing connections Singing Banzo Linux - Networking 9 07-26-2006 08:21 AM
Can't see the big picture BarryRadio Linux - Newbie 23 01-08-2004 07:23 PM
sound issues and Xine,Noatun,Gnomemeeting stram Linux - Software 0 05-27-2002 03:22 AM


All times are GMT -5. The time now is 04:04 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration