From 322b0616322760dc162447563d8f4da7e024ca90 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 7 Jan 2014 21:39:47 +0100 Subject: DetachedSong: fork of struct Song From now on, struct Song will be used by the database only, and DetachedSong will be used by everybody else. DetachedSong is easier to use, but Song has lower overhead. --- src/DecoderControl.hxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/DecoderControl.hxx') diff --git a/src/DecoderControl.hxx b/src/DecoderControl.hxx index 863398dca..bacdad347 100644 --- a/src/DecoderControl.hxx +++ b/src/DecoderControl.hxx @@ -36,7 +36,7 @@ #undef ERROR #endif -struct Song; +class DetachedSong; class MusicBuffer; class MusicPipe; @@ -123,7 +123,7 @@ struct DecoderControl { * This is a duplicate, and must be freed when this attribute * is cleared. */ - Song *song; + DetachedSong *song; /** * The initial seek position (in milliseconds), e.g. to the @@ -293,10 +293,10 @@ struct DecoderControl { * Caller must lock the object. */ gcc_pure - bool IsCurrentSong(const Song &_song) const; + bool IsCurrentSong(const DetachedSong &_song) const; gcc_pure - bool LockIsCurrentSong(const Song &_song) const { + bool LockIsCurrentSong(const DetachedSong &_song) const { Lock(); const bool result = IsCurrentSong(_song); Unlock(); @@ -360,7 +360,7 @@ public: * @param pipe the pipe which receives the decoded chunks (owned by * the caller) */ - void Start(Song *song, unsigned start_ms, unsigned end_ms, + void Start(DetachedSong *song, unsigned start_ms, unsigned end_ms, MusicBuffer &buffer, MusicPipe &pipe); void Stop(); -- cgit v1.2.3