where is the definition of member functions in the struct audio_track_cblk_t

by max » Wed, 24 Jun 2009 20:33:14 GMT


Sponsored Links
 Hi All,

I don't know whether there is someone who have a look at the structure
audio_track_cblk_t, which is at
frameworks/base/include/private/media/AudioTrackShared.h
struct audio_track_cblk_t
{

    // The data members are grouped so that members accessed
frequently and in the same context
    // are in the same line of data cache.
                Mutex       lock;
                Condition   cv;
    volatile    uint32_t    user;
    volatile    uint32_t    server;
                uint32_t    userBase;
                uint32_t    serverBase;
    void*       buffers;
    uint32_t    frameCount;
    // Cache line boundary
    uint32_t    loopStart;
    uint32_t    loopEnd;
    int         loopCount;
    volatile    union {
                    uint16_t    volume[2];
                    uint32_t    volumeLR;
                };
                uint16_t    sampleRate;
                uint16_t    channels;
                int16_t     flowControlFlag; // underrun (out) or
overrrun (in) indication
                uint8_t     out;        // out equals 1 for AudioTrack
and 0 for AudioRecord
                uint8_t     forceReady;
                uint16_t    bufferTimeoutMs; // Maximum cumulated
timeout before restarting audioflinger
                uint16_t    waitTimeMs;      // Cumulated wait time
                // Padding ensuring that data buffer starts on a cache
line boundary (32 bytes).
                // See AudioFlinger::TrackBase constructor
                int32_t     Padding[3];

                            audio_track_cblk_t();
                uint32_t    stepUser(uint32_t frameCount);
                bool        stepServer(uint32_t frameCount);
                void*       buffer(uint32_t offset) const;
                uint32_t    framesAvailable();
                uint32_t    framesAvailable_l();
                uint32_t    framesReady();
};
I try to find where is the definition of framesReady(), stepUser() and
etc, but I cann't get the location, anybody can tell me?

Thanks a lot
--~--~---------~--~----~------------~-------~--~----~

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



where is the definition of member functions in the struct audio_track_cblk_t

by max » Wed, 24 Jun 2009 20:34:52 GMT


 Hi All,

I don't know whether there is someone who have a look at the structure
audio_track_cblk_t, which is at
frameworks/base/include/private/media/AudioTrackShared.h
struct audio_track_cblk_t
{

    // The data members are grouped so that members accessed
frequently and in the same context
    // are in the same line of data cache.
                Mutex       lock;
                Condition   cv;
    volatile    uint32_t    user;
    volatile    uint32_t    server;
                uint32_t    userBase;
                uint32_t    serverBase;
    void*       buffers;
    uint32_t    frameCount;
    // Cache line boundary
    uint32_t    loopStart;
    uint32_t    loopEnd;
    int         loopCount;
    volatile    union {
                    uint16_t    volume[2];
                    uint32_t    volumeLR;
                };
                uint16_t    sampleRate;
                uint16_t    channels;
                int16_t     flowControlFlag; // underrun (out) or
overrrun (in) indication
                uint8_t     out;        // out equals 1 for AudioTrack
and 0 for AudioRecord
                uint8_t     forceReady;
                uint16_t    bufferTimeoutMs; // Maximum cumulated
timeout before restarting audioflinger
                uint16_t    waitTimeMs;      // Cumulated wait time
                // Padding ensuring that data buffer starts on a cache
line boundary (32 bytes).
                // See AudioFlinger::TrackBase constructor
                int32_t     Padding[3];

                            audio_track_cblk_t();
                uint32_t    stepUser(uint32_t frameCount);
                bool        stepServer(uint32_t frameCount);
                void*       buffer(uint32_t offset) const;
                uint32_t    framesAvailable();
                uint32_t    framesAvailable_l();
                uint32_t    framesReady();
};
I try to find where is the definition of framesReady(), stepUser() and
etc, but I cann't get the location, anybody can tell me?

Thanks a lot
--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


where is the definition of member functions in the struct audio_track_cblk_t

by Mark Murphy » Wed, 24 Jun 2009 20:36:02 GMT


 


Questions about the Android source code are best asked on a list that
pertains to the Android source code:

 http://source.android.com/discuss 

-- 
Mark Murphy (a Commons Guy)
 http://commonsware.com  |  http://twitter.com/commonsguy 

_The Busy Coder's Guide to *Advanced* Android Development_
Version 0.9 Available!

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



Other Threads

1. android on X86 will not boot after June 22nd

Fadden:
  Thanks.
I don't have it at present.
Is there some good approach for generating the native stack trace? It seems
in my case, it just aborts and restarts the zygote again and again.

value doesn't belong to any dalvik heap.
one case I remembered:
IS_CLASS_FLAG_SET(clazz, CLASS_ISARRAY) in scanObject: caused segfault

Any plan to introduce the precise GC soon? Thanks.
--
Chen







--~--~---------~--~----~------------~-------~--~----~
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

2. showDialog and dismissDialog behave strangely when changing orientation

Hi
I am using the showDialog and dismissDialog methods to show progress
dialogs in my app. Moved from creating the dialog and calling show()
on it to using this in order to save state when changing orientation.
But when I change the orientation from portrait->landscape->portrait,
the dismissDialog method call no longer dismisses the dialog. The
dialog stay there all the time and I need to press the back button for
it to disappear.
To overcome this issue, I tried adding a removeDialog in onDestroy so
that the dialog is not created/displayed twice and before orientation
change, the dialog is removed. Tried adding log statements and this is
what happens
05-21 12:35:14.064: DEBUG/MyClass(193): *************callingShowDialog
05-21 12:35:14.064: DEBUG/MyClass(193): *************onCreareDialog

05-21 12:35:15.385: DEBUG/MyClass(193):
*************onSaveInstanceState
05-21 12:35:15.415: DEBUG/MyClass(193): *************onDestroy

05-21 12:35:15.585: DEBUG/MyClass(193): *************callingShowDialog
05-21 12:35:15.585: DEBUG/MyClass(193): *************onCreareDialog
05-21 12:35:15.715: DEBUG/MyClass(193): *************onCreareDialog
05-21 12:35:17.214: DEBUG/MyClass(193):
*************onSaveInstanceState
05-21 12:35:17.214: DEBUG/MyClass(193): *************onDestroy

05-21 12:35:17.275: ERROR/WindowManager(193):
android.view.WindowLeaked: Activity com.android.MyClass has leaked
window com.android.internal.policy.impl.phonewindow$decorv...@43362088
that was originally added here
Some error statements....
05-21 12:35:17.395: DEBUG/MyClass(193): *************callingShowDialog
05-21 12:35:17.395: DEBUG/MyClass(193): *************onCreareDialog
05-21 12:35:17.475: DEBUG/MyClass(193): *************onCreareDialog

Initially when the activity is displayed, the onCreateDialog is called
once and on changing the orientation, onSaveInstanceState and
onDestroy are called.
But after that, onCreateDialog is called twice (once by a call to
showDialog which I make, but why the 2nd time?) and this happens every
time I change the orientation hence forth.
Any idea why that happens?
Thanks
--~--~---------~--~----~------------~-------~--~----~

3. two questions about MediaPlayer

4. Could not find class com.google.gdata.data.calendar.CalendarEventFeed

5. How to implement multi-windows in android?

6. how can I control the decoder class in OMX

7. Programmatically prevent Toast from appearing?