From 7ee8ac94bb1a724a481a7cddf10ce63d35df6296 Mon Sep 17 00:00:00 2001 From: Marco Nelissen Date: Tue, 12 Jan 2010 09:23:54 -0800 Subject: b/2353646 Fix music visualizations to also work with audiotrack callbacks, which stagefright uses. This slightly changes the way the data is stored, since before we were relying on the buffers being written always being at least 4K, whereas the callbacks are generally for smaller amounts of data. Now we append all the data to a big circular buffer, then return chunks of that buffer for visualization. When there are multiple things playing at the same time, this will give the wrong result, but (1) that was the case before as well, and (2) will be fixed once we start visualizing the mixer output instead of the mixer inputs. --- media/libmediaplayerservice/MediaPlayerService.h | 1 + 1 file changed, 1 insertion(+) (limited to 'media/libmediaplayerservice/MediaPlayerService.h') diff --git a/media/libmediaplayerservice/MediaPlayerService.h b/media/libmediaplayerservice/MediaPlayerService.h index 1c90cf9..d1206b4 100644 --- a/media/libmediaplayerservice/MediaPlayerService.h +++ b/media/libmediaplayerservice/MediaPlayerService.h @@ -113,6 +113,7 @@ class MediaPlayerService : public BnMediaPlayerService public: // visualization hack support uint32_t mNumFramesWritten; + void snoopWrite(const void*, size_t); }; class AudioCache : public MediaPlayerBase::AudioSink -- cgit v1.1