Page 1 of 3 123 LastLast
Results 1 to 10 of 26

Thread: Delayed sound on Flash plugin

  1. #1

    Default Delayed sound on Flash plugin

    OK, some background:

    * I have a USB headset, no sound card
    * Previously when I was using OpenSUSE 11.0 Beta, I got sound for the operating system (opening windows for example) but no sound in Flash
    * I installed OpenSUSE 11.0 and got no sound at all
    * I updated Alsa (and Flash with sound support) using:
    - Flash Player:Additional Interface Support for Linux - Adobe Labs
    - Alsa-update - openSUSE

    After doing that, the flash video would play and for 3 seconds have no sound, then all of a sudden the sound would play but 3-seconds behind the video. If I pause the video, the audio keeps playing. So it's always delayed.

    Any ideas how to fix this?

  2. #2

    Default Re: Delayed sound on Flash plugin

    I fixed it!

    Here's what I did:

    1. Created the file "/home/yourusername/.asoundrc" with the data:

    Code:
    usb.default
    # usb.default begins ###
    pcm.!default {
    type hw
    card 1
    }
    ctl.!default {
    type hw
    card 1
    }
    # usb.default ends ###
    2. Restarted Alsa with command: "rcalsasound restart"
    NOTE: You must login in as super user (via "su" command) in your konsole to execute this command

    3. Removed my USB headset and plugged it back in

    NOTE: This made it so there was NO sound.

    4. Deleted the file "/home/yourusername/.asoundrc"

    5. Restarted Alsa again

    6. Removed my USB headset and plugged it back in

    And then it worked!

    NOTE: This is after doing all of the previous steps in my original post. So anyone having the same issue of no sound or delayed sound needs to follow those steps first and then do this.

  3. #3

    Default Re: Delayed sound on Flash plugin

    Argh! now the problem is back! I restarted the computer and now when I watch a youtube video, the delay is there again!

    OK, here's where I am:

    * If I do my above steps (recreating the ".asoundrc" file, taking out the headset, restarting alsa, deleteing the file, restarting alsa, and taking out headset again, it works!

    - So this means I have to do this EVERY TIME to get the audio to synch up with the video!

    Given that this fixes it every time, but that the problem comes back after restarting the computer, what do you think could be the issue?

  4. #4

    Default Re: Delayed sound on Flash plugin

    Since this issue seems to be "work-aroundable" by re-running those steps each time, should I put it in a startup script? Is there any danger of corruption by doing that each startup?

  5. #5
    Join Date
    Mar 2008
    Location
    Phuket, Thailand
    Posts
    26,518
    Blog Entries
    37

    Default Re: Delayed sound on Flash plugin

    Quote Originally Posted by 6tr6tr View Post
    Since this issue seems to be "work-aroundable" by re-running those steps each time, should I put it in a startup script? Is there any danger of corruption by doing that each startup?
    The solution you have adopted is strange, and my suspicion is that the .asoundrc file may not have been configured properly for your USB device. I know you noted you have no sound card, but do you have sound hardware on your motherboard?

    In order to provide a reasonable recommendation, I need more information. With your sound working, to provide more information, with your PC connected to the internet copy and paste the following into a gnome-terminal or konsole:
    Code:
    wget http://home.cfl.rr.com/infofiles/tsalsa && su -c 'bash ./tsalsa'
    when prompted for a password please enter your root password. Please try to accurately answer the question on the number of plugs/jacks on your PC (for example my PC has 3 i/o plugs/jacks). When the script completes it will pass you a URL. Please post that URL here.

    It may also be useful to run the same diagnostic script with your sound NOT working, and then post the output URL here. That will give us something to compare.

    Also, please copy and paste the following into a gnome-terminal or konsole and post the output here.
    rpm -qa | grep alsa
    rpm -qa | grep pulse
    rpm -q libasound2
    uname -a
    cat /etc/modprobe.d/sound

    Once I have that information, I believe I may be able to provide helpful recommendation(s).

    Note I am travelling a lot right now, so my response may take a few days.

  6. #6
    Join Date
    Mar 2008
    Location
    Phuket, Thailand
    Posts
    26,518
    Blog Entries
    37

    Default Re: Delayed sound on Flash plugin

    An idea, in addition to the above request for more information, another "command line tool" to use to try and better characterize the problem, is to copy and paste the following into a gnome-terminal or konsole, when your audio is working properly:
    lsof /dev/dsp* /dev/audio* /dev/mixer* /dev/snd/*
    and make note of the output.

    Then, when you have have the delayed sound problem, copy and paste the same into a gnome-terminal or konsole and also make note of the output.

    Check to see if there are any significant differences.

  7. #7

    Default Re: Delayed sound on Flash plugin

    Quote Originally Posted by oldcpu View Post
    An idea, in addition to the above request for more information, another "command line tool" to use to try and better characterize the problem, is to copy and paste the following into a gnome-terminal or konsole, when your audio is working properly:
    lsof /dev/dsp* /dev/audio* /dev/mixer* /dev/snd/*
    and make note of the output.

    Then, when you have have the delayed sound problem, copy and paste the same into a gnome-terminal or konsole and also make note of the output.

    Check to see if there are any significant differences.
    I get the response:
    lsof: command not found

  8. #8

    Default Re: Delayed sound on Flash plugin

    OK, I installed lsof and I ran it twice. Once when the audio did NOT work and once when it DID work. Here's what I got:

    WHEN AUDIO NOT WORKING:
    Code:
    COMMAND    PID     USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
    kmix      2819 USERNAME   17u   CHR  116,5      0t0 3184 /dev/snd/controlC0
    operaplug 4081 USERNAME    9w   CHR   14,3      0t0 4565 /dev/dsp
    (Here I restarted alsa and unplugged and replugged in my USB headset. It then worked properly)

    WHEN AUDIO IS WORKING:
    Code:
    lsof: status error on /dev/dsp*: No such file or directory
    lsof: status error on /dev/audio*: No such file or directory
    lsof: status error on /dev/mixer*: No such file or directory
    COMMAND    PID     USER   FD   TYPE DEVICE SIZE/OFF  NODE NAME
    kmix      7135 USERNAME   12u   CHR  116,5      0t0 33530 /dev/snd/controlC0
    operaplug 7273 USERNAME  mem    CHR  116,3          33516 /dev/snd/pcmC0D0p
    operaplug 7273 USERNAME    9r   CHR  116,2      0t0 33409 /dev/snd/timer
    operaplug 7273 USERNAME   10u   CHR  116,3      0t0 33516 /dev/snd/pcmC0D0p

  9. #9
    Join Date
    Mar 2008
    Location
    Phuket, Thailand
    Posts
    26,518
    Blog Entries
    37

    Default Re: Delayed sound on Flash plugin

    Quote Originally Posted by 6tr6tr View Post
    OK, I installed lsof and I ran it twice. Once when the audio did NOT work and once when it DID work. Here's what I got:

    WHEN AUDIO NOT WORKING:
    Code:
    COMMAND    PID     USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
    kmix      2819 USERNAME   17u   CHR  116,5      0t0 3184 /dev/snd/controlC0
    operaplug 4081 USERNAME    9w   CHR   14,3      0t0 4565 /dev/dsp
    Thats a suprise. /dev/dsp is typically used with the oss driver. I assume you are using an alsa driver. The last thing I expected to see was /dev/dsp providing an output. The error you got when sound worked is interesting .... :
    Quote Originally Posted by 6tr6tr View Post
    WHEN AUDIO IS WORKING:
    Code:
    lsof: status error on /dev/dsp*: No such file or directory
    Do you have alsa-oss installed?

    Quote Originally Posted by 6tr6tr View Post
    (Here I restarted alsa and unplugged and replugged in my USB headset. It then worked properly)
    What command are you using to restart alsa? su -c 'rcalsasound restart' ?

    Next time you restart alsa, and your sound does not work, can you run:
    dmesg > dmesg.txt && curl -F file=@dmesg.txt nopaste.com/a
    and post the URL it gives here. I am looking for an error message in the dmesg file.

  10. #10
    Join Date
    Mar 2008
    Location
    Phuket, Thailand
    Posts
    26,518
    Blog Entries
    37

    Default Re: Delayed sound on Flash plugin

    Quote Originally Posted by oldcpu View Post
    Next time you .......
    Another request, ... I would like to see what sound modules are running when your sound does not work, and what sound modules are running when it DOES work.

    When it does NOT work, can you copy and paste:
    lsmod | grep snd > nosound.txt && curl -F file=@nosound.txt nopaste.com/a


    and when it DOES work can you copy and paste:
    lsmod | grep snd > havesound.txt && curl -F file=@havesound.txt nopaste.com/a


    And paste here the two URLs.

Page 1 of 3 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •