Audio stops after some time in android from video/Music player

by getandroid » Mon, 16 Feb 2009 12:15:59 GMT


Sponsored Links
 Hi,

   I'm facing a problem with Video/Music player where audio stops
coming after a random number of times. After some debugging I found
that:

In android_audio_output.cpp->audout_thread_func, there is
iAudioThreadSem->Wait(); before the while(1) loop and it is stuck
there indefinitely. I understand it is waiting for a signal from MIO
saying that the buffer is written and ready to be dumped to audio
flinger. For some reason it is not getting the signal. Is this
correct?

Can anybody throw some light on this?
--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---



Audio stops after some time in android from video/Music player

by Dave Sparks » Mon, 16 Feb 2009 16:28:07 GMT


 Which branch are you working on?



--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---


Sponsored Links


Audio stops after some time in android from video/Music player

by getandroid » Mon, 16 Feb 2009 20:01:41 GMT


 Hi,

   As mentioned audio stops after some random number of times when
played from either Music/Video player. After some debugging, I found
that the problem is:

In "android_audio_output.cpp"->audout_thread_func() there is a call to
wait(iAudioThreadSem->Wait()) just before the while(1) and it is
waiting indefinitely for something.

Can anybody tell me what is it waiting for and why is it not able to
come out? From what I can understand, it is waiting for a signal
(semaphore) but where is it expecting a signal from?
--~--~---------~--~----~------------~-------~--~----~



Audio stops after some time in android from video/Music player

by Dave Sparks » Tue, 17 Feb 2009 00:57:42 GMT


 Please don't cross-post. This question isn't appropriate for the
application developer forum.



--~--~---------~--~----~------------~-------~--~----~



Audio stops after some time in android from video/Music player

by getandroid » Tue, 17 Feb 2009 05:41:09 GMT


 I'm working on android 1.0 release




--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---



Audio stops after some time in android from video/Music player

by getandroid » Tue, 17 Feb 2009 08:19:59 GMT


 I've done following change in android_audio_output.cpp. It is better
after enabling RESET mode instead of STOP. Is there any fix for PV
core which mentioned in the comments of code snippet below??

# if 0 //SAMPATH commented
// FIXME: Per PV, we should be exiting thread in Reset, not Stop.
However, doing so
// causes app death, so presumably PV is asserting somewhere and
causing an abort.
// When this gets fixed, remove this Stop function and bring back the
Reset function.
PVMFCommandId AndroidAudioOutput::Stop(const OsclAny* aContext)
{
    // request output thread to exit
    LOGV("Stop (%p)", aContext);
    RequestAndWaitForThreadExit();
    return AndroidAudioMIO::Stop(aContext);
}
#endif

#if 1 //SAMPATH enabled
PVMFCommandId AndroidAudioOutput::Reset(const OsclAny* aContext)
{
    // request output thread to exit
    LOGV("Reset (%p)", aContext);
    RequestAndWaitForThreadExit();
    return AndroidAudioMIO::Reset(aContext);
}
#endif





--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---



Other Threads

1. Webview with progress and url overriding

Hi!

I would like to add a Webview that both intercepts the URL clicks and
shows a progress when loading.

URL overriding:
myWebView.setWebViewClient(new WebViewClient() {
                    @Override public boolean shouldOverrideUrlLoading(WebView 
view,
String url) {
...

Progress:
myWebView.setWebChromeClient(new WebChromeClient(){
          @Override
          public void onProgressChanged(WebView view, int newProgress) {
...

But is there any way to combine these two? The WebViewClient only
offers OnPageFinished and then I can't show any real progress when
loading.

-Christer

--~--~---------~--~----~------------~-------~--~----~

2. Unknown permission com.android.browser.permission.READ_HISTORY_BOOKMARKS

I'm getting reports from users about force closes in my app after the
donut OTA.  One of them was kind enough to send me a logcat which
included these two gems (right after he installed it from market):

10-02 15:56:35.708 D/PackageManager(   71): New package installed in /
data/app/com.billnapier.android.livebookmarks.apk
10-02 15:56:35.708 W/PackageManager(   71): Unknown permission
com.android.browser.permission.READ_HISTORY_BOOKMARKS in package
com.billnapier.android.livebookmarks
10-02 15:56:35.708 W/PackageManager(   71): Unknown permission
android.permission.READ_HISTORY_BOOKMARKS in package
com.billnapier.android.livebookmarks

The second one makes sense, since that name has gone away.  But I
can't figure out why the first one would show up, since that
permission should exist on the phone.  anybody got any clues?  I can't
reproduce this on my phone, so it's kinda hard to debug.  :)

Bill

--~--~---------~--~----~------------~-------~--~----~

3. apikey for MapView

4. Question about LocationServices issue (3453): has this been solved in Donut (1.6)?

5. Announcement: [New project] Build and run only Dalvik

6. jar files shared by multiple apps

7. Google Android Developers Required - NJ - Telecom Giant Client