X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7981fe9b2bfd255a9d2d18f2e39e5891aac1c5e4..8f9d20d16f54a088aea5fb5e826bf1690efac2ff:/samples/sound/sound.cpp diff --git a/samples/sound/sound.cpp b/samples/sound/sound.cpp index 85ea3ba494..7ddb31f564 100644 --- a/samples/sound/sound.cpp +++ b/samples/sound/sound.cpp @@ -111,7 +111,7 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame) EVT_MENU(Sound_About, MyFrame::OnAbout) EVT_MENU(Sound_PlaySync, MyFrame::OnPlaySync) EVT_MENU(Sound_PlayAsync, MyFrame::OnPlayAsync) - EVT_MENU(Sound_PlayAsyncOnStack, MyFrame::OnPlayAsync) + EVT_MENU(Sound_PlayAsyncOnStack, MyFrame::OnPlayAsyncOnStack) EVT_MENU(Sound_PlayLoop, MyFrame::OnPlayLoop) END_EVENT_TABLE() @@ -164,12 +164,12 @@ MyFrame::MyFrame(const wxString& title) wxMenu *helpMenu = new wxMenu; wxMenu *playMenu = new wxMenu; helpMenu->Append(Sound_About, _T("&About...\tF1"), _T("Show about dialog")); - menuFile->Append(Sound_SelectFile, _T("&Select WAV file"), _T("Select a new wav file to play")); + menuFile->Append(Sound_SelectFile, _T("&Select WAV file\tCtrl+O"), _T("Select a new wav file to play")); menuFile->Append(Sound_Quit, _T("E&xit\tAlt-X"), _T("Quit this program")); - playMenu->Append(Sound_PlaySync, _T("Play sound &synchronously")); - playMenu->Append(Sound_PlayAsync, _T("Play sound &asynchronously")); - playMenu->Append(Sound_PlayAsync, _T("Play sound asynchronously (&object on stack)")); - playMenu->Append(Sound_PlayLoop, _T("&Loop sound")); + playMenu->Append(Sound_PlaySync, _T("Play sound &synchronously\tCtrl+S")); + playMenu->Append(Sound_PlayAsync, _T("Play sound &asynchronously\tCtrl+A")); + playMenu->Append(Sound_PlayAsyncOnStack, _T("Play sound asynchronously (&object on stack)\tCtrl+T")); + playMenu->Append(Sound_PlayLoop, _T("&Loop sound\tCtrl+L")); // now append the freshly created menu to the menu bar... wxMenuBar *menuBar = new wxMenuBar(); @@ -225,7 +225,7 @@ void MyFrame::OnPlaySync(wxCommandEvent& WXUNUSED(event)) if (!m_sound) m_sound = new wxSound(m_soundFile); if (m_sound->IsOk()) - m_sound->Play((unsigned)wxSOUND_SYNC); + m_sound->Play(wxSOUND_SYNC); } void MyFrame::OnPlayAsync(wxCommandEvent& WXUNUSED(event)) @@ -234,7 +234,7 @@ void MyFrame::OnPlayAsync(wxCommandEvent& WXUNUSED(event)) if (!m_sound) m_sound = new wxSound(m_soundFile); if (m_sound->IsOk()) - m_sound->Play((unsigned)wxSOUND_ASYNC); + m_sound->Play(wxSOUND_ASYNC); } void MyFrame::OnPlayAsyncOnStack(wxCommandEvent& WXUNUSED(event)) @@ -242,7 +242,7 @@ void MyFrame::OnPlayAsyncOnStack(wxCommandEvent& WXUNUSED(event)) wxBusyCursor busy; wxSound snd(m_soundFile); if (snd.IsOk()) - snd.Play((unsigned)wxSOUND_ASYNC); + snd.Play(wxSOUND_ASYNC); } void MyFrame::OnPlayLoop(wxCommandEvent& WXUNUSED(event)) @@ -251,7 +251,7 @@ void MyFrame::OnPlayLoop(wxCommandEvent& WXUNUSED(event)) if (!m_sound) m_sound = new wxSound(m_soundFile); if (m_sound->IsOk()) - m_sound->Play((unsigned)(wxSOUND_ASYNC | wxSOUND_LOOP)); + m_sound->Play(wxSOUND_ASYNC | wxSOUND_LOOP); } void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))