Skip to content

Commit

Permalink
MythMusic: silence a few warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Harrison committed Dec 15, 2010
1 parent e9d1645 commit 5b160f2
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 19 deletions.
2 changes: 1 addition & 1 deletion mythplugins/mythmusic/mythmusic/lameencoder.cpp
Expand Up @@ -36,7 +36,7 @@

using namespace std;

int write_buffer(char *buf, int bufsize, FILE *fp)
static int write_buffer(char *buf, int bufsize, FILE *fp)
{
return fwrite(buf, 1, bufsize, fp);
}
Expand Down
2 changes: 1 addition & 1 deletion mythplugins/mythmusic/mythmusic/metadata.cpp
Expand Up @@ -37,7 +37,7 @@ bool operator!=(const Metadata& a, const Metadata& b)
return false;
}

bool meta_less_than(const Metadata *item1, const Metadata *item2)
static bool meta_less_than(const Metadata *item1, const Metadata *item2)
{
return item1->compare(item2) < 0;
}
Expand Down
22 changes: 7 additions & 15 deletions mythplugins/mythmusic/mythmusic/musiccommon.cpp
Expand Up @@ -235,7 +235,7 @@ bool MusicCommon::CreateCommon(void)
#endif

m_controlVolume = gCoreContext->GetNumSetting("MythControlsVolume");
updateVolume(gPlayer->getVolume(), gPlayer->isMuted());
updateVolume();

if (m_movingTracksState)
m_movingTracksState->DisplayState("off");
Expand Down Expand Up @@ -263,6 +263,7 @@ bool MusicCommon::CreateCommon(void)

void MusicCommon::switchView(int view)
{
(void) view;
#if 0
MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack();

Expand Down Expand Up @@ -591,6 +592,7 @@ void MusicCommon::showVolume(void)

void MusicCommon::showSpeed(bool show)
{
(void) show;
#if 0
if (speed_status)
{
Expand Down Expand Up @@ -1109,17 +1111,13 @@ void MusicCommon::customEvent(QEvent *event)
}
else if (event->type() == MusicPlayerEvent::VolumeChangeEvent)
{
MusicPlayerEvent *mpe = (MusicPlayerEvent*)(event);
updateVolume(mpe->Volume, mpe->IsMuted);
updateVolume();
}
else if (event->type() == MusicPlayerEvent::TrackRemovedEvent)
{
//FIXME should just remove the list item
if (m_currentPlaylist)
{
MusicPlayerEvent *mpe = (MusicPlayerEvent*)(event);
// int trackID = mpe->TrackID;
// FIXME: should restore track position
int pos = m_currentPlaylist->GetCurrentPos();
int topPos = m_currentPlaylist->GetTopItemPos();
updateUIPlaylist();
Expand All @@ -1132,8 +1130,6 @@ void MusicCommon::customEvent(QEvent *event)
{
if (m_currentPlaylist)
{
MusicPlayerEvent *mpe = (MusicPlayerEvent*)(event);
// int trackID = mpe->TrackID;
int pos = m_currentPlaylist->GetCurrentPos();
int topPos = m_currentPlaylist->GetTopItemPos();
updateUIPlaylist();
Expand All @@ -1144,7 +1140,6 @@ void MusicCommon::customEvent(QEvent *event)
}
else if (event->type() == MusicPlayerEvent::AllTracksRemovedEvent)
{
MusicPlayerEvent *mpe = (MusicPlayerEvent*)(event);
updateUIPlaylist();
updatePlaylistStats();
}
Expand Down Expand Up @@ -1173,7 +1168,7 @@ void MusicCommon::customEvent(QEvent *event)
}
}

void MusicCommon::updateVolume(uint volume, bool muted)
void MusicCommon::updateVolume(void)
{
if (!m_controlVolume)
{
Expand All @@ -1195,12 +1190,14 @@ void MusicCommon::updateVolume(uint volume, bool muted)

if (m_muteState)
{
bool muted = gPlayer->isMuted();
m_muteState->DisplayState(muted ? "on" : "off");
}
}

void MusicCommon::editTrackInfo(Metadata *mdata)
{
(void) mdata;
#if 0
if (!mdata)
return;
Expand Down Expand Up @@ -1527,11 +1524,6 @@ bool MythMusicVolumeDialog::keyPressEvent(QKeyEvent *event)
return handled;
}

void MythMusicVolumeDialog::customEvent(QEvent *event)
{

}

void MythMusicVolumeDialog::increaseVolume(void)
{
gPlayer->incVolume();
Expand Down
3 changes: 1 addition & 2 deletions mythplugins/mythmusic/mythmusic/musiccommon.h
Expand Up @@ -79,7 +79,7 @@ class MPUBLIC MusicCommon : public MythScreenType
void toggleMute(void);
void toggleUpmix(void);
void showVolume(void);
void updateVolume(uint volume, bool muted);
void updateVolume(void);
void showSpeed(bool show);

void startVisualizer(void);
Expand Down Expand Up @@ -160,7 +160,6 @@ class MPUBLIC MythMusicVolumeDialog : public MythScreenType

bool Create(void);
bool keyPressEvent(QKeyEvent *event);
void customEvent(QEvent *event);

protected:
void increaseVolume(void);
Expand Down

0 comments on commit 5b160f2

Please sign in to comment.