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;
-#elif defined(__WIN32__)
+#elif defined(__WINDOWS__) && !defined(__MINGW32__) && !defined(__WATCOMC__)
+ // versions of Open Watcom and MinGW tested against this source does not
+ // deliver "digitalv.h" required in this feature
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;