From 604fbfa88874135f9bbc0afa42e36e39cfc21f6c Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Sat, 14 Mar 2020 21:03:14 +0000 Subject: refactoring git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@9287 90c681e8-e032-0410-971d-27865f9a5e38 --- src/plugins/Input/cdaudio/decoder_cdaudio.cpp | 9 +-------- src/plugins/Input/cdaudio/decoder_cdaudio.h | 16 ++++++++-------- 2 files changed, 9 insertions(+), 16 deletions(-) (limited to 'src') diff --git a/src/plugins/Input/cdaudio/decoder_cdaudio.cpp b/src/plugins/Input/cdaudio/decoder_cdaudio.cpp index afc6b2995..e8971c2d3 100644 --- a/src/plugins/Input/cdaudio/decoder_cdaudio.cpp +++ b/src/plugins/Input/cdaudio/decoder_cdaudio.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2009-2016 by Ilya Kotov * + * Copyright (C) 2009-2020 by Ilya Kotov * * forkotov02@ya.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -81,14 +81,7 @@ static void cddb_log_handler(cddb_log_level_t level, const char *message) DecoderCDAudio::DecoderCDAudio(const QString &url) : Decoder() { - m_bitrate = 0; - m_totalTime = 0; - m_first_sector = -1; - m_last_sector = -1; - m_current_sector = -1; m_url = url; - m_cdio = nullptr; - m_buffer_at = 0; m_buffer = new char[CDDA_BUFFER_SIZE]; } diff --git a/src/plugins/Input/cdaudio/decoder_cdaudio.h b/src/plugins/Input/cdaudio/decoder_cdaudio.h index 5da4c1ea7..130f85bd4 100644 --- a/src/plugins/Input/cdaudio/decoder_cdaudio.h +++ b/src/plugins/Input/cdaudio/decoder_cdaudio.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2009-2016 by Ilya Kotov * + * Copyright (C) 2009-2020 by Ilya Kotov * * forkotov02@ya.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -63,16 +63,16 @@ private: static void saveToCache(QList tracks, uint disc_id); static bool readFromCache(QList *tracks, uint disc_id); // libcdio variables - lsn_t m_first_sector; - lsn_t m_last_sector; - lsn_t m_current_sector; - CdIo_t *m_cdio; + lsn_t m_first_sector = -1; + lsn_t m_last_sector = -1; + lsn_t m_current_sector = -1; + CdIo_t *m_cdio = nullptr; //other variables QString m_url; - int m_bitrate; - qint64 m_totalTime; + int m_bitrate = 0; + qint64 m_totalTime = 0; char *m_buffer; - qint64 m_buffer_at; + qint64 m_buffer_at = 0; //tracks cache static QList m_track_cache; }; -- cgit v1.2.3-13-gbd6f