* 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:
@@ -620,9 +620,10 @@ void wxStringList::Sort()
|
|||||||
{
|
{
|
||||||
size_t N = GetCount();
|
size_t N = GetCount();
|
||||||
char **array = new char *[N];
|
char **array = new char *[N];
|
||||||
|
wxStringListNode *node;
|
||||||
|
|
||||||
size_t i = 0;
|
size_t i = 0;
|
||||||
for ( wxStringListNode *node = GetFirst(); node; node = node->GetNext() )
|
for ( node = GetFirst(); node; node = node->GetNext() )
|
||||||
{
|
{
|
||||||
array[i++] = node->GetData();
|
array[i++] = node->GetData();
|
||||||
}
|
}
|
||||||
|
@@ -136,6 +136,7 @@ void wxStreamBuffer::SetBufferIO(size_t bufsize)
|
|||||||
|
|
||||||
void wxStreamBuffer::ResetBuffer()
|
void wxStreamBuffer::ResetBuffer()
|
||||||
{
|
{
|
||||||
|
m_stream->m_lasterror = wxStream_NOERROR;
|
||||||
if (m_mode == read)
|
if (m_mode == read)
|
||||||
m_buffer_pos = m_buffer_end;
|
m_buffer_pos = m_buffer_end;
|
||||||
else
|
else
|
||||||
@@ -285,6 +286,7 @@ size_t wxStreamBuffer::Read(void *buffer, size_t size)
|
|||||||
// Buffering disabled
|
// Buffering disabled
|
||||||
// ------------------
|
// ------------------
|
||||||
|
|
||||||
|
m_stream->m_lasterror = wxStream_NOERROR;
|
||||||
m_stream->m_lastcount = GetWBack((char *)buffer, size);
|
m_stream->m_lastcount = GetWBack((char *)buffer, size);
|
||||||
size -= m_stream->m_lastcount;
|
size -= m_stream->m_lastcount;
|
||||||
if (size == 0)
|
if (size == 0)
|
||||||
@@ -345,6 +347,7 @@ size_t wxStreamBuffer::Write(const void *buffer, size_t size)
|
|||||||
// Buffering disabled
|
// Buffering disabled
|
||||||
// ------------------
|
// ------------------
|
||||||
|
|
||||||
|
m_stream->m_lasterror = wxStream_NOERROR;
|
||||||
if (!m_buffer_size)
|
if (!m_buffer_size)
|
||||||
return (m_stream->m_lastcount = m_stream->OnSysWrite(buffer, size));
|
return (m_stream->m_lastcount = m_stream->OnSysWrite(buffer, size));
|
||||||
|
|
||||||
|
@@ -17,9 +17,9 @@ ADPCM_SRC=\
|
|||||||
g711.cpp g721.cpp g723_24.cpp g723_40.cpp g72x.cpp
|
g711.cpp g721.cpp g723_24.cpp g723_40.cpp g72x.cpp
|
||||||
|
|
||||||
MMEDIA_SRC=\
|
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 \
|
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)
|
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__
|
#ifdef __GNUG__
|
||||||
#pragma implementation "sndfrmt.h"
|
#pragma implementation "sndfrmt.h"
|
||||||
#endif
|
#endif
|
||||||
@@ -81,6 +90,7 @@ wxSoundCodec *wxSoundDataFormat::GetCodec()
|
|||||||
|
|
||||||
m_codchange = FALSE;
|
m_codchange = FALSE;
|
||||||
m_codec = wxSoundCodec::Get(m_codno);
|
m_codec = wxSoundCodec::Get(m_codno);
|
||||||
|
CodecChange();
|
||||||
|
|
||||||
return m_codec;
|
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__
|
#ifndef __SNDFRMT_H__
|
||||||
#define __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__
|
#ifdef __GNUG__
|
||||||
#pragma implementation "sndmulaw.h"
|
#pragma implementation "sndmulaw.h"
|
||||||
#endif
|
#endif
|
||||||
|
@@ -101,8 +101,6 @@ void wxSndBuffer::HardUnlock()
|
|||||||
|
|
||||||
void wxSndBuffer::ChangeCodec(int no)
|
void wxSndBuffer::ChangeCodec(int no)
|
||||||
{
|
{
|
||||||
wxDELETE(m_sndcodec);
|
|
||||||
|
|
||||||
m_sndformat.SetCodecNo(no);
|
m_sndformat.SetCodecNo(no);
|
||||||
m_sndcodec = m_sndformat.GetCodec();
|
m_sndcodec = m_sndformat.GetCodec();
|
||||||
m_sndcodec->SetIOBuffer(this);
|
m_sndcodec->SetIOBuffer(this);
|
||||||
|
@@ -106,8 +106,6 @@ bool wxUssSound::DoInput(wxSndBuffer *buf)
|
|||||||
wxSoundCodec *codec = buf->GetCurrentCodec();
|
wxSoundCodec *codec = buf->GetCurrentCodec();
|
||||||
|
|
||||||
m_sndbuf->ResetBuffer();
|
m_sndbuf->ResetBuffer();
|
||||||
codec->SetInStream(m_sndbuf);
|
|
||||||
codec->InitIO(m_ussformat);
|
|
||||||
|
|
||||||
bufsize = codec->Available();
|
bufsize = codec->Available();
|
||||||
if (bufsize > m_max_bufsize)
|
if (bufsize > m_max_bufsize)
|
||||||
@@ -152,11 +150,18 @@ bool wxUssSound::InitBuffer(wxSndBuffer *buf)
|
|||||||
}
|
}
|
||||||
|
|
||||||
codec = buf->GetCurrentCodec();
|
codec = buf->GetCurrentCodec();
|
||||||
codec->SetOutStream(m_sndbuf);
|
switch (m_mode) {
|
||||||
codec->InitIO(m_ussformat);
|
case wxSND_INPUT:
|
||||||
// TODO: We need more tests here.
|
codec->SetInStream(m_sndbuf);
|
||||||
codec->InitMode((m_mode == wxSND_OUTPUT) ? wxSoundCodec::DECODING : wxSoundCodec::ENCODING);
|
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;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user