Service + AudioTrack: is WAKE_LOCK needed?

by Paul Marks » Tue, 02 Feb 2010 10:05:48 GMT


Sponsored Links
 


After speaking with one of the developers, I learned:

- On current platforms, the audio driver acquires its own wake lock,
which explains why my phone was not going to sleep.
 http://android.git.kernel.org/?p=platform/hardware/msm7k.git ;a=blob;f=libaudio-qsd8k/AudioHardware.cpp;hb=HEAD

- There's no explicit guarantee that this will always be true for all
platforms, so it's still a good idea to hold a PARTIAL_WAKE_LOCK if
you need to stay awake while using an AudioTrack.

--



Other Threads

1. SurfaceView transparent through to its parent?

I have a SurfaceView that is covering a portion of its parent, a
RelativeLayout.  I have a background image covering the full
RelativeLayout area, and this is my Activity's main layout.

I would like to have the SurfaceView be transparent so that I can see
through to the background image on its parent RelativeLayout.  I have
tried the approach shown in the API Demos example
TranslucentGLSurfaceViewActivity, but this succeeds in making the
transparency go all the way through my Activity to my desktop!

I'm using the "style/Theme.Translucent" theme on my activity, and
setting this on my SurfaceView:
   mySurfaceView.getHolder().setFormat(PixelFormat.RGBA_8888);

The transparency to the desktop it kinda cool, but not what I'm trying
to do!  Is it possible to make a SurfaceView transparent only through
to its parent?

Thanks,
Blake
--~--~---------~--~----~------------~-------~--~----~

2. How to bring a existing activity to foregroung when the application icon in program list is clicked

When the application icon in program list is clicked, create a new activity if 
the activity does not exist, or bring the existing activity to foreground. I 
tried to add add launchMode to manifest but that does not take effect, The 
related part of manifest like:
      <activity android:name=".MyActivity"
                  android:label="@string/app_name"
                  android:launchMode="singleTask">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category
android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>


How can I implement it? Thanks in advance!

BR,
-Jiang




      ___________________________________________________________ 
  
http://card.mail.cn.yahoo.com/
--~--~---------~--~----~------------~-------~--~----~

3. wifi signal question

4. Market numbers are weird the last few days

5. listview lose focus when touch

6. BigNerdRanch.com - 5 day Android Bootcamp - GIVEAWAY!

7. Size of data type "enum"