// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
wxSoundStream *m_output_stream;
wxInputStream *m_input_stream;
wxSoundFileStream *m_file_stream;
wxSoundStream *m_output_stream;
wxInputStream *m_input_stream;
wxSoundFileStream *m_file_stream;
{
m_input_stream = new wxFileInputStream(filename);
m_output_stream = MMBoardManager::OpenSoundStream();
{
m_input_stream = new wxFileInputStream(filename);
m_output_stream = MMBoardManager::OpenSoundStream();
// First, we try a Wave decoder
f_stream = new wxSoundWave(*m_input_stream, *m_output_stream);
m_file_type = MMBoard_WAVE;
if (f_stream->CanRead())
return f_stream;
delete f_stream;
// First, we try a Wave decoder
f_stream = new wxSoundWave(*m_input_stream, *m_output_stream);
m_file_type = MMBoard_WAVE;
if (f_stream->CanRead())
return f_stream;
delete f_stream;
// Then, a AIFF decoder
f_stream = new wxSoundAiff(*m_input_stream, *m_output_stream);
m_file_type = MMBoard_AIFF;
if (f_stream->CanRead())
return f_stream;
delete f_stream;
// Then, a AIFF decoder
f_stream = new wxSoundAiff(*m_input_stream, *m_output_stream);
m_file_type = MMBoard_AIFF;
if (f_stream->CanRead())
return f_stream;
delete f_stream;
length = m_file_stream->GetPosition();
seconds = m_file_stream->GetSoundFormat().GetTimeFromBytes(length);
file_time.seconds = seconds % 60;
file_time.minutes = (seconds / 60) % 60;
file_time.hours = seconds / 3600;
length = m_file_stream->GetPosition();
seconds = m_file_stream->GetSoundFormat().GetTimeFromBytes(length);
file_time.seconds = seconds % 60;
file_time.minutes = (seconds / 60) % 60;
file_time.hours = seconds / 3600;
info = wxT("Data encoding: ");
switch (format->GetType()) {
case wxSOUND_PCM: {
wxSoundFormatPcm *pcm_format = (wxSoundFormatPcm *)format;
info = wxT("Data encoding: ");
switch (format->GetType()) {
case wxSOUND_PCM: {
wxSoundFormatPcm *pcm_format = (wxSoundFormatPcm *)format;
pcm_format->Signed() ? wxT("signed") : wxT("unsigned"),
pcm_format->GetOrder() == wxLITTLE_ENDIAN ? wxT("little endian") : wxT("big endian"));
pcm_format->Signed() ? wxT("signed") : wxT("unsigned"),
pcm_format->GetOrder() == wxLITTLE_ENDIAN ? wxT("little endian") : wxT("big endian"));
- info += wxString::Format(wxT("Sampling rate: %d\n")
- wxT("Bits per sample: %d\n")
- wxT("Number of channels: %d\n"),
- pcm_format->GetSampleRate(),
- pcm_format->GetBPS(),
- pcm_format->GetChannels());
-
- break;
+ info += wxString::Format(wxT("Sampling rate: %d\n")
+ wxT("Bits per sample: %d\n")
+ wxT("Number of channels: %d\n"),
+ pcm_format->GetSampleRate(),
+ pcm_format->GetBPS(),
+ pcm_format->GetChannels());
+
+ break;
// versions of Open Watcom and MinGW tested against this source does not
// deliver "digitalv.h" required in this feature
m_video_driver = new wxVideoWindows(filename);
#else
// versions of Open Watcom and MinGW tested against this source does not
// deliver "digitalv.h" required in this feature
m_video_driver = new wxVideoWindows(filename);
#else
btime.seconds = frameTime % 60;
btime.minutes = (frameTime / 60) % 60;
btime.hours = frameTime / 3600;
btime.seconds = frameTime % 60;
btime.minutes = (frameTime / 60) % 60;
btime.hours = frameTime / 3600;
wxMessageBox(_T("You are trying to open a multimedia but you have not devices"), _T("Error"), wxOK | wxICON_ERROR, NULL);
return NULL;
wxMessageBox(_T("You are trying to open a multimedia but you have not devices"), _T("Error"), wxOK | wxICON_ERROR, NULL);
return NULL;