Allow selecting any kind of file in the sound sample.
This is especially useful under Mac where wxSound can play files other than .wav too (e.g. .aiff files which can be found under /System/Library/Sounds). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66536 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -993,7 +993,13 @@ void MyFrame::OnSelectFile(wxCommandEvent& WXUNUSED(event))
|
|||||||
#if wxUSE_FILEDLG
|
#if wxUSE_FILEDLG
|
||||||
wxFileDialog dlg(this, wxT("Choose a sound file"),
|
wxFileDialog dlg(this, wxT("Choose a sound file"),
|
||||||
wxEmptyString, wxEmptyString,
|
wxEmptyString, wxEmptyString,
|
||||||
wxT("WAV files (*.wav)|*.wav"), wxFD_OPEN|wxFD_CHANGE_DIR);
|
wxString::Format
|
||||||
|
(
|
||||||
|
"WAV files (*.wav)|*.wav|All files (%s)|%s",
|
||||||
|
wxFileSelectorDefaultWildcardStr,
|
||||||
|
wxFileSelectorDefaultWildcardStr
|
||||||
|
),
|
||||||
|
wxFD_OPEN|wxFD_CHANGE_DIR);
|
||||||
if ( dlg.ShowModal() == wxID_OK )
|
if ( dlg.ShowModal() == wxID_OK )
|
||||||
{
|
{
|
||||||
m_soundFile = dlg.GetPath();
|
m_soundFile = dlg.GetPath();
|
||||||
|
Reference in New Issue
Block a user