* Fixes (AIF works on Linux)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1265 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -17,9 +17,9 @@ ADPCM_SRC=\
|
||||
g711.cpp g721.cpp g723_24.cpp g723_40.cpp g72x.cpp
|
||||
|
||||
MMEDIA_SRC=\
|
||||
mmdata.cpp mmfile.cpp mmsolve.cpp sndsnd.cpp sndfrmt.cpp sndpcm.o \
|
||||
mmdata.cpp mmfile.cpp mmsolve.cpp sndsnd.cpp sndfrmt.cpp sndpcm.cpp \
|
||||
snduss.cpp sndfile.cpp sndwav.cpp mmriff.cpp vidbase.cpp vidxanm.cpp \
|
||||
cdbase.cpp cdunix.cpp
|
||||
cdbase.cpp cdunix.cpp sndaiff.cpp sndmulaw.cpp sndau.cpp
|
||||
|
||||
LIB_SRC= $(ADPCM_SRC:%.cpp=adpcm/%.cpp) $(MMEDIA_SRC)
|
||||
|
||||
|
@@ -1,3 +1,12 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Name: sndfrmt.cpp
|
||||
// Purpose: wxMMedia
|
||||
// Author: Guilhem Lavaux
|
||||
// Created: 1998
|
||||
// Updated: December 1998
|
||||
// Copyright: (C) 1997, 1998, Guilhem Lavaux
|
||||
// License: wxWindows license
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
#ifdef __GNUG__
|
||||
#pragma implementation "sndfrmt.h"
|
||||
#endif
|
||||
@@ -81,6 +90,7 @@ wxSoundCodec *wxSoundDataFormat::GetCodec()
|
||||
|
||||
m_codchange = FALSE;
|
||||
m_codec = wxSoundCodec::Get(m_codno);
|
||||
CodecChange();
|
||||
|
||||
return m_codec;
|
||||
}
|
||||
|
@@ -1,3 +1,12 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Name: sndfrmt.h
|
||||
// Purpose: wxMMedia
|
||||
// Author: Guilhem Lavaux
|
||||
// Created: 1998
|
||||
// Updated: December 1998
|
||||
// Copyright: (C) 1997, 1998, Guilhem Lavaux
|
||||
// License: wxWindows license
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
#ifndef __SNDFRMT_H__
|
||||
#define __SNDFRMT_H__
|
||||
|
||||
|
@@ -1,3 +1,12 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Name: sndmulaw.cpp
|
||||
// Purpose: wxMMedia
|
||||
// Author: Guilhem Lavaux
|
||||
// Created: 1997
|
||||
// Updated: December 1998
|
||||
// Copyright: (C) 1997, 1998, Guilhem Lavaux
|
||||
// License: wxWindows license
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
#ifdef __GNUG__
|
||||
#pragma implementation "sndmulaw.h"
|
||||
#endif
|
||||
|
@@ -101,8 +101,6 @@ void wxSndBuffer::HardUnlock()
|
||||
|
||||
void wxSndBuffer::ChangeCodec(int no)
|
||||
{
|
||||
wxDELETE(m_sndcodec);
|
||||
|
||||
m_sndformat.SetCodecNo(no);
|
||||
m_sndcodec = m_sndformat.GetCodec();
|
||||
m_sndcodec->SetIOBuffer(this);
|
||||
|
@@ -106,8 +106,6 @@ bool wxUssSound::DoInput(wxSndBuffer *buf)
|
||||
wxSoundCodec *codec = buf->GetCurrentCodec();
|
||||
|
||||
m_sndbuf->ResetBuffer();
|
||||
codec->SetInStream(m_sndbuf);
|
||||
codec->InitIO(m_ussformat);
|
||||
|
||||
bufsize = codec->Available();
|
||||
if (bufsize > m_max_bufsize)
|
||||
@@ -152,11 +150,18 @@ bool wxUssSound::InitBuffer(wxSndBuffer *buf)
|
||||
}
|
||||
|
||||
codec = buf->GetCurrentCodec();
|
||||
codec->SetOutStream(m_sndbuf);
|
||||
codec->InitIO(m_ussformat);
|
||||
// TODO: We need more tests here.
|
||||
codec->InitMode((m_mode == wxSND_OUTPUT) ? wxSoundCodec::DECODING : wxSoundCodec::ENCODING);
|
||||
|
||||
switch (m_mode) {
|
||||
case wxSND_INPUT:
|
||||
codec->SetInStream(m_sndbuf);
|
||||
codec->InitIO(m_ussformat);
|
||||
codec->InitMode(wxSoundCodec::ENCODING);
|
||||
break;
|
||||
case wxSND_OUTPUT:
|
||||
codec->SetOutStream(m_sndbuf);
|
||||
codec->InitIO(m_ussformat);
|
||||
codec->InitMode(wxSoundCodec::DECODING);
|
||||
break;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user