summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
d05237e)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1265
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
{
size_t N = GetCount();
char **array = new char *[N];
{
size_t N = GetCount();
char **array = new char *[N];
+ wxStringListNode *node;
- for ( wxStringListNode *node = GetFirst(); node; node = node->GetNext() )
+ for ( node = GetFirst(); node; node = node->GetNext() )
{
array[i++] = node->GetData();
}
{
array[i++] = node->GetData();
}
void wxStreamBuffer::ResetBuffer()
{
void wxStreamBuffer::ResetBuffer()
{
+ m_stream->m_lasterror = wxStream_NOERROR;
if (m_mode == read)
m_buffer_pos = m_buffer_end;
else
if (m_mode == read)
m_buffer_pos = m_buffer_end;
else
// Buffering disabled
// ------------------
// Buffering disabled
// ------------------
+ m_stream->m_lasterror = wxStream_NOERROR;
m_stream->m_lastcount = GetWBack((char *)buffer, size);
size -= m_stream->m_lastcount;
if (size == 0)
m_stream->m_lastcount = GetWBack((char *)buffer, size);
size -= m_stream->m_lastcount;
if (size == 0)
// Buffering disabled
// ------------------
// Buffering disabled
// ------------------
+ m_stream->m_lasterror = wxStream_NOERROR;
if (!m_buffer_size)
return (m_stream->m_lastcount = m_stream->OnSysWrite(buffer, size));
if (!m_buffer_size)
return (m_stream->m_lastcount = m_stream->OnSysWrite(buffer, size));
g711.cpp g721.cpp g723_24.cpp g723_40.cpp g72x.cpp
MMEDIA_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 \
snduss.cpp sndfile.cpp sndwav.cpp mmriff.cpp vidbase.cpp vidxanm.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)
+////////////////////////////////////////////////////////////////////////////////
+// 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
#ifdef __GNUG__
#pragma implementation "sndfrmt.h"
#endif
m_codchange = FALSE;
m_codec = wxSoundCodec::Get(m_codno);
m_codchange = FALSE;
m_codec = wxSoundCodec::Get(m_codno);
+////////////////////////////////////////////////////////////////////////////////
+// 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__
#ifndef __SNDFRMT_H__
#define __SNDFRMT_H__
+////////////////////////////////////////////////////////////////////////////////
+// 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
#ifdef __GNUG__
#pragma implementation "sndmulaw.h"
#endif
void wxSndBuffer::ChangeCodec(int no)
{
void wxSndBuffer::ChangeCodec(int no)
{
- wxDELETE(m_sndcodec);
-
m_sndformat.SetCodecNo(no);
m_sndcodec = m_sndformat.GetCodec();
m_sndcodec->SetIOBuffer(this);
m_sndformat.SetCodecNo(no);
m_sndcodec = m_sndformat.GetCodec();
m_sndcodec->SetIOBuffer(this);
wxSoundCodec *codec = buf->GetCurrentCodec();
m_sndbuf->ResetBuffer();
wxSoundCodec *codec = buf->GetCurrentCodec();
m_sndbuf->ResetBuffer();
- codec->SetInStream(m_sndbuf);
- codec->InitIO(m_ussformat);
bufsize = codec->Available();
if (bufsize > m_max_bufsize)
bufsize = codec->Available();
if (bufsize > m_max_bufsize)
}
codec = buf->GetCurrentCodec();
}
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;
+ }