aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/MadDecoderPlugin.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-10-17 09:43:55 +0200
committerMax Kellermann <max@duempel.org>2013-10-17 10:45:10 +0200
commit05de2e998c7df2757ae63ce6a053e27eca3d13ca (patch)
tree2c85c43cb69dc2dc7086bfddc66090928cd0d93f /src/decoder/MadDecoderPlugin.cxx
parent24780d99e61af44141e8f0d0d0776a1c994e6770 (diff)
downloadmpd-05de2e998c7df2757ae63ce6a053e27eca3d13ca.tar.gz
mpd-05de2e998c7df2757ae63ce6a053e27eca3d13ca.tar.xz
mpd-05de2e998c7df2757ae63ce6a053e27eca3d13ca.zip
InputStream: use int64_t instead of goffset
Decouple some more from GLib.
Diffstat (limited to 'src/decoder/MadDecoderPlugin.cxx')
-rw-r--r--src/decoder/MadDecoderPlugin.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/decoder/MadDecoderPlugin.cxx b/src/decoder/MadDecoderPlugin.cxx
index 1cce24f31..a6c53bfb6 100644
--- a/src/decoder/MadDecoderPlugin.cxx
+++ b/src/decoder/MadDecoderPlugin.cxx
@@ -152,10 +152,10 @@ struct MadDecoder {
enum mp3_action DecodeNextFrame();
gcc_pure
- goffset ThisFrameOffset() const;
+ input_stream::offset_type ThisFrameOffset() const;
gcc_pure
- goffset RestIncludingThisFrame() const;
+ input_stream::offset_type RestIncludingThisFrame() const;
/**
* Attempt to calulcate the length of the song from filesize
@@ -776,10 +776,10 @@ mp3_frame_duration(const struct mad_frame *frame)
MAD_UNITS_MILLISECONDS) / 1000.0;
}
-inline goffset
+inline input_stream::offset_type
MadDecoder::ThisFrameOffset() const
{
- goffset offset = input_stream->GetOffset();
+ auto offset = input_stream->GetOffset();
if (stream.this_frame != nullptr)
offset -= stream.bufend - stream.this_frame;
@@ -789,7 +789,7 @@ MadDecoder::ThisFrameOffset() const
return offset;
}
-inline goffset
+inline input_stream::offset_type
MadDecoder::RestIncludingThisFrame() const
{
return input_stream->GetSize() - ThisFrameOffset();
@@ -798,7 +798,7 @@ MadDecoder::RestIncludingThisFrame() const
inline void
MadDecoder::FileSizeToSongLength()
{
- goffset rest = RestIncludingThisFrame();
+ input_stream::offset_type rest = RestIncludingThisFrame();
if (rest > 0) {
float frame_duration = mp3_frame_duration(&frame);