Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fb1fdc9d authored by Glenn Kasten's avatar Glenn Kasten
Browse files

Add comments

Change-Id: Ifbf3a46a4183c8abc0feee1c588953ab10303cc1
parent 551ababe
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -75,8 +75,10 @@ public:
        size_t      frameCount;   // number of sample frames corresponding to size;
                                  // on input it is the number of frames desired,
                                  // on output is the number of frames actually filled
                                  // (currently ignored, but will make the primary field in future)

        size_t      size;         // input/output in bytes == frameCount * frameSize
                                  // on output is the number of bytes actually filled
                                  // FIXME this is redundant with respect to frameCount,
                                  // and TRANSFER_OBTAIN mode is broken for 8-bit data
                                  // since we don't define the frame format
+3 −1
Original line number Diff line number Diff line
@@ -125,7 +125,9 @@ public:
    virtual     String8     getParameters(audio_io_handle_t ioHandle, const String8& keys)
                                    const = 0;

    // register a current process for audio output change notifications
    // Register an object to receive audio input/output change and track notifications.
    // For a given calling pid, AudioFlinger disregards any registrations after the first.
    // Thus the IAudioFlingerClient must be a singleton per process.
    virtual void registerClient(const sp<IAudioFlingerClient>& client) = 0;

    // retrieve the audio recording buffer size
+10 −0
Original line number Diff line number Diff line
@@ -90,6 +90,8 @@ public:
    virtual ~Timeline();
#endif

    // Input parameter 'size' is the desired size of the timeline in byte units.
    // Returns the size rounded up to a power-of-2, plus the constant size overhead for indices.
    static size_t sharedSize(size_t size);

#if 0
@@ -110,8 +112,12 @@ private:
class Writer : public RefBase {
public:
    Writer();                   // dummy nop implementation without shared memory

    // Input parameter 'size' is the desired size of the timeline in byte units.
    // The size of the shared memory must be at least Timeline::sharedSize(size).
    Writer(size_t size, void *shared);
    Writer(size_t size, const sp<IMemory>& iMemory);

    virtual ~Writer() { }

    virtual void    log(const char *string);
@@ -165,8 +171,12 @@ private:

class Reader : public RefBase {
public:

    // Input parameter 'size' is the desired size of the timeline in byte units.
    // The size of the shared memory must be at least Timeline::sharedSize(size).
    Reader(size_t size, const void *shared);
    Reader(size_t size, const sp<IMemory>& iMemory);

    virtual ~Reader() { }

    void    dump(int fd, size_t indent = 0);
+2 −0
Original line number Diff line number Diff line
@@ -537,6 +537,8 @@ const sp<IAudioPolicyService>& AudioSystem::get_audio_policy_service()
    return gAudioPolicyService;
}

// ---------------------------------------------------------------------------

status_t AudioSystem::setDeviceConnectionState(audio_devices_t device,
                                               audio_policy_dev_state_t state,
                                               const char *device_address)
+7 −0
Original line number Diff line number Diff line
@@ -585,6 +585,7 @@ void AudioTrack::setLoop_l(uint32_t loopStart, uint32_t loopEnd, int loopCount)

status_t AudioTrack::setMarkerPosition(uint32_t marker)
{
    // The only purpose of setting marker position is to get a callback
    if (mCbf == NULL) {
        return INVALID_OPERATION;
    }
@@ -610,6 +611,7 @@ status_t AudioTrack::getMarkerPosition(uint32_t *marker) const

status_t AudioTrack::setPositionUpdatePeriod(uint32_t updatePeriod)
{
    // The only purpose of setting position update period is to get a callback
    if (mCbf == NULL) {
        return INVALID_OPERATION;
    }
@@ -1220,6 +1222,11 @@ status_t TimedAudioTrack::setMediaTimeTransform(const LinearTransform& xform,

nsecs_t AudioTrack::processAudioBuffer(const sp<AudioTrackThread>& thread)
{
    // Currently the AudioTrack thread is not created if there are no callbacks.
    // Would it ever make sense to run the thread, even without callbacks?
    // If so, then replace this by checks at each use for mCbf != NULL.
    LOG_ALWAYS_FATAL_IF(mCblk == NULL);

    mLock.lock();
    if (mAwaitBoost) {
        mAwaitBoost = false;
Loading