* Added a small wxHTTP description
* Added some example/description to wxFTP * Some more on wxURL * Added missing file in wxMMedia git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1795 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
30
utils/wxMMedia/sndadpcm.h
Normal file
30
utils/wxMMedia/sndadpcm.h
Normal file
@@ -0,0 +1,30 @@
|
||||
#ifndef __MEDIA_SNDADPCM_H__
|
||||
#define __MEDIA_SNDADPCM_H__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#endif
|
||||
|
||||
#include "sndfrmt.h"
|
||||
|
||||
class wxSoundAdpcmCodec : public wxSoundCodec {
|
||||
DECLARE_DYNAMIC_CLASS(wxSoundAdpcmCodec)
|
||||
public:
|
||||
wxSoundAdpcmCodec();
|
||||
~wxSoundAdpcmCodec();
|
||||
|
||||
size_t GetByteRate() const;
|
||||
wxSoundDataFormat GetPreferredFormat(int codec = 0) const;
|
||||
int GetBits(int bits);
|
||||
|
||||
void Decode();
|
||||
void Encode();
|
||||
|
||||
void InitWith(const wxSoundDataFormat& format);
|
||||
protected:
|
||||
struct g72x_state *m_codec_state;
|
||||
int m_bits_waiting, m_current_byte;
|
||||
int m_srate;
|
||||
};
|
||||
|
||||
#endif
|
@@ -36,6 +36,7 @@ class wxSoundDataFormat {
|
||||
void SetChannels(int channels);
|
||||
void SetStereo(bool on);
|
||||
void SetCodecNo(int no);
|
||||
int GetCodecNo() { return m_codno; }
|
||||
void SetCodecCreate(bool create) { m_codcreate = create; }
|
||||
|
||||
int GetSampleRate() const { return m_srate; }
|
||||
|
@@ -140,13 +140,12 @@ bool wxSndWavCodec::PrepareToRecord(wxUint32 m_fsize)
|
||||
if (!riff_codec.CreateChunk("fmt ", sizeof(wav_hdr)))
|
||||
return FALSE;
|
||||
|
||||
wav_hdr.format = 1; // PCM_WAV_FORMAT
|
||||
wav_hdr.format = m_sndformat.GetCodecNo(); // PCM_WAV_FORMAT
|
||||
wav_hdr.channels = m_sndformat.GetChannels();
|
||||
wav_hdr.sample_fq = m_sndformat.GetSampleRate();
|
||||
wav_hdr.byte_p_spl = (m_sndformat.GetBps() / 8) * wav_hdr.channels;
|
||||
wav_hdr.byte_p_sec = m_sndformat.GetCodec()->GetByteRate();
|
||||
wav_hdr.bits_p_spl = m_sndformat.GetBps();
|
||||
ChangeCodec(WXSOUND_PCM);
|
||||
|
||||
if (wav_hdr.format == WXSOUND_PCM) {
|
||||
m_sndformat.SetSign(wxSND_SAMPLE_SIGNED);
|
||||
|
Reference in New Issue
Block a user