Skip to content

Commit

Permalink
add BOARD_USES_ECLAIR_LIBAUDIO (used on Milestone port)
Browse files Browse the repository at this point in the history
  • Loading branch information
nadlabak committed Sep 19, 2010
1 parent dd699a2 commit dd4a761
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libs/audioflinger/Android.mk
Expand Up @@ -99,6 +99,10 @@ ifeq ($(strip $(BOARD_USES_GENERIC_AUDIO)),true)
LOCAL_CFLAGS += -DGENERIC_AUDIO
else
LOCAL_SHARED_LIBRARIES += libaudio libaudiopolicy
ifeq ($(BOARD_USES_ECLAIR_LIBAUDIO),true)
LOCAL_STATIC_LIBRARIES += libaudiopolicybase
LOCAL_CFLAGS += -DBOARD_USES_ECLAIR_LIBAUDIO
endif
endif

ifeq ($(TARGET_SIMULATOR),true)
Expand Down
8 changes: 8 additions & 0 deletions libs/audioflinger/AudioFlinger.cpp
Expand Up @@ -1271,6 +1271,9 @@ void AudioFlinger::PlaybackThread::readOutputParameters()

status_t AudioFlinger::PlaybackThread::getRenderPosition(uint32_t *halFrames, uint32_t *dspFrames)
{
#ifdef BOARD_USES_ECLAIR_LIBAUDIO
return INVALID_OPERATION;
#else
if (halFrames == 0 || dspFrames == 0) {
return BAD_VALUE;
}
Expand All @@ -1280,6 +1283,7 @@ status_t AudioFlinger::PlaybackThread::getRenderPosition(uint32_t *halFrames, ui
*halFrames = mBytesWritten/mOutput->frameSize();

return mOutput->getRenderPosition(dspFrames);
#endif
}

// ----------------------------------------------------------------------------
Expand Down Expand Up @@ -3727,7 +3731,11 @@ void AudioFlinger::RecordThread::readInputParameters()

unsigned int AudioFlinger::RecordThread::getInputFramesLost()
{
#ifdef BOARD_USES_ECLAIR_LIBAUDIO
return 0;
#else
return mInput->getInputFramesLost();
#endif
}

// ----------------------------------------------------------------------------
Expand Down

1 comment on commit dd4a761

@nadlabak
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes are needed to take care of the functions missing from a proprietary eclair's libaudio in order to be able to use it on froyo.

Please sign in to comment.