1. Check out our companion app, Forums for Android! Download from Google Play

Android Emulator - No sound

Discussion in 'Application Development' started by QuintonHeckroth, Jun 23, 2010.

  1. QuintonHeckroth

    QuintonHeckroth New Member
    Thread Starter
    5

    Jun 23, 2010
    1
    0
    5
    Hey guys,

    I'm brand new to Android and this forum and was hoping someone could please help :)

    I've been trying out some of the basic tutorials and taking snippets of code from here and there until I tried using audio, in particular

    Audio and Video | Android Developers

    Using the Local file method, the code compiles fine however there is no sound, at first I thought it was a problem solely with my application but it was apparent that even the emulator volume controls should be making a sound.

    I tried opening the Emulator through the command prompt and noticed the 3 lines:

    emulator: using winaudio audio input backend
    emulator: using winaudio audio output backend
    emulator: Trace file name is not set

    I understand that winaudio relates to Windows Wave but is there a problem with the Trace line?

    I'm running Windows 7 32-bit, if that's any use.

    Any help would be massively appreciated,

    Quinton
     

    Advertisement

  2. tomalley

    tomalley New Member
    5

    Jul 12, 2010
    1
    0
    5
    Did you ever get an answer? I have the same issue, but on Windows XP Pro.
    Thanks,
    ~TO
     
  3. walcellularllc

    6

    Jul 17, 2010
    6
    1
    6
    www.thephonerush.com
    www.thephonerush.com
    Reset the phone back to factory settings like i did
     
  4. pgorbas

    pgorbas Member
    5

    Feb 2, 2011
    5
    0
    5
    Application Dveloper
    A year later and still noone has posted a solution.

    I am running windows 7 64 bit with latest eclipse and andoid sdk.

    I have not been able to figure out how to get the emulator to make sounds.
     
  5. pgorbas

    pgorbas Member
    5

    Feb 2, 2011
    5
    0
    5
    Application Dveloper
    The issue was not with the emulator not making sound ( as verified by
    the fact it would not work on my device either ), but a unaccounted
    problem with the SoundPool class.

    I looked in the logcat and found references like "sample 1 not ready". Researching this I finally found a obscure thread in which it was mentioned that it takes some time before sound pool is ready to be used ( and therefore all sounds should be loaded well before they are used ).


    I modified my playSound method to monitor the return value of the
    soundPool.play(...) method call. It returns the id of the running
    sound stream, or 0 if it failed ( i.e. "sample 1 not ready" ).
    What I did was to put it into a loop, and when the return value of the
    soundPool.play(...) method call was 0, I had the thread sleep for 1
    millisecond, then try again. With this method in place, I now always
    get a sound.
     
  6. unmplyabol

    unmplyabol New Member
    5

    Apr 22, 2011
    4
    0
    5
    I have also been having this problem. The funny thing is, it USED to work.

    But a few weeks ago, it stopped working.

    I am just using the simplified

    mMediaPlayer = MediaPlayer.Create(context, resource) followed
    by the mMediaPlayer.start().

    I also tried using the code for the SoundPool which was mentioned in a
    previous reply. Even though I don't get any errors, and the logic works
    fine, I still do not get any sound.
     

Share This Page

Loading...