Removed unnecessary code from utilsunx.cpp
Corrected the support for seeking in wxSoundFileStream. Added support for seeking in wxMultimediaBoard Reindentation of the code (conforming or nearly to the coding standard) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6291 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
a9c3ed030e
commit
794bcc2dea
@ -45,3 +45,4 @@ You need to move the three files included in this directory:
|
|||||||
- utilsunx.cpp => src/unix
|
- utilsunx.cpp => src/unix
|
||||||
- process.cpp => src/common
|
- process.cpp => src/common
|
||||||
- process.h => include/wx
|
- process.h => include/wx
|
||||||
|
- utilsexc.cpp => src/msw
|
||||||
|
@ -83,6 +83,7 @@ public:
|
|||||||
|
|
||||||
MMBoardTime GetPosition();
|
MMBoardTime GetPosition();
|
||||||
MMBoardTime GetLength();
|
MMBoardTime GetLength();
|
||||||
|
void SetPosition(MMBoardTime btime);
|
||||||
|
|
||||||
bool IsStopped();
|
bool IsStopped();
|
||||||
bool IsPaused();
|
bool IsPaused();
|
||||||
@ -117,6 +118,7 @@ public:
|
|||||||
|
|
||||||
MMBoardTime GetPosition();
|
MMBoardTime GetPosition();
|
||||||
MMBoardTime GetLength();
|
MMBoardTime GetLength();
|
||||||
|
void SetPosition(MMBoardTime btime);
|
||||||
|
|
||||||
bool IsStopped();
|
bool IsStopped();
|
||||||
bool IsPaused();
|
bool IsPaused();
|
||||||
@ -229,6 +231,17 @@ MMBoardTime MMBoardSoundFile::GetPosition()
|
|||||||
return file_time;
|
return file_time;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MMBoardSoundFile::SetPosition(MMBoardTime btime)
|
||||||
|
{
|
||||||
|
wxUint32 itime;
|
||||||
|
|
||||||
|
itime = btime.seconds + btime.minutes * 60 + btime.hours;
|
||||||
|
|
||||||
|
m_file_stream->SetPosition(
|
||||||
|
m_file_stream->GetSoundFormat().GetBytesFromTime(itime)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
bool MMBoardSoundFile::NeedWindow()
|
bool MMBoardSoundFile::NeedWindow()
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@ -392,6 +405,10 @@ MMBoardTime MMBoardVideoFile::GetLength()
|
|||||||
return btime;
|
return btime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MMBoardVideoFile::SetPosition(MMBoardTime btime)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
bool MMBoardVideoFile::IsStopped()
|
bool MMBoardVideoFile::IsStopped()
|
||||||
{
|
{
|
||||||
return m_video_driver->IsStopped();
|
return m_video_driver->IsStopped();
|
||||||
|
@ -54,6 +54,7 @@ class MMBoardFile {
|
|||||||
|
|
||||||
virtual MMBoardTime GetPosition() = 0;
|
virtual MMBoardTime GetPosition() = 0;
|
||||||
virtual MMBoardTime GetLength() = 0;
|
virtual MMBoardTime GetLength() = 0;
|
||||||
|
virtual void SetPosition(MMBoardTime btime) = 0;
|
||||||
|
|
||||||
virtual bool IsStopped() = 0;
|
virtual bool IsStopped() = 0;
|
||||||
virtual bool IsPaused() = 0;
|
virtual bool IsPaused() = 0;
|
||||||
|
@ -83,7 +83,9 @@ public:
|
|||||||
void OnPlay(wxCommandEvent& event);
|
void OnPlay(wxCommandEvent& event);
|
||||||
void OnStop(wxCommandEvent& event);
|
void OnStop(wxCommandEvent& event);
|
||||||
void OnPause(wxCommandEvent& event);
|
void OnPause(wxCommandEvent& event);
|
||||||
|
void OnEject(wxCommandEvent& event);
|
||||||
void OnRefreshInfo(wxEvent& event);
|
void OnRefreshInfo(wxEvent& event);
|
||||||
|
void OnSetPosition(wxCommandEvent& event);
|
||||||
|
|
||||||
void OpenVideoWindow();
|
void OpenVideoWindow();
|
||||||
void CloseVideoWindow();
|
void CloseVideoWindow();
|
||||||
@ -107,7 +109,6 @@ private:
|
|||||||
wxSizer *m_sizer;
|
wxSizer *m_sizer;
|
||||||
|
|
||||||
wxTimer *m_refreshTimer;
|
wxTimer *m_refreshTimer;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@ -141,6 +142,8 @@ BEGIN_EVENT_TABLE(MMBoardFrame, wxFrame)
|
|||||||
EVT_BUTTON(MMBoard_PlayButton, MMBoardFrame::OnPlay)
|
EVT_BUTTON(MMBoard_PlayButton, MMBoardFrame::OnPlay)
|
||||||
EVT_BUTTON(MMBoard_StopButton, MMBoardFrame::OnStop)
|
EVT_BUTTON(MMBoard_StopButton, MMBoardFrame::OnStop)
|
||||||
EVT_BUTTON(MMBoard_PauseButton, MMBoardFrame::OnPause)
|
EVT_BUTTON(MMBoard_PauseButton, MMBoardFrame::OnPause)
|
||||||
|
EVT_BUTTON(MMBoard_EjectButton, MMBoardFrame::OnEject)
|
||||||
|
EVT_SLIDER(MMBoard_PositionSlider, MMBoardFrame::OnSetPosition)
|
||||||
EVT_CUSTOM(wxEVT_TIMER, MMBoard_RefreshInfo, MMBoardFrame::OnRefreshInfo)
|
EVT_CUSTOM(wxEVT_TIMER, MMBoard_RefreshInfo, MMBoardFrame::OnRefreshInfo)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
@ -243,20 +246,20 @@ MMBoardFrame::MMBoardFrame(const wxString& title, const wxPoint& pos, const wxSi
|
|||||||
SetIcon(wxICON(mondrian));
|
SetIcon(wxICON(mondrian));
|
||||||
|
|
||||||
// create a menu bar
|
// create a menu bar
|
||||||
wxMenu *menuFile = new wxMenu(_T(""), wxMENU_TEAROFF);
|
wxMenu *menuFile = new wxMenu(wxT(""), wxMENU_TEAROFF);
|
||||||
|
|
||||||
// the "About" item should be in the help menu
|
// the "About" item should be in the help menu
|
||||||
wxMenu *helpMenu = new wxMenu;
|
wxMenu *helpMenu = new wxMenu;
|
||||||
helpMenu->Append(MMBoard_About, _T("&About...\tCtrl-A"), _T("Show about dialog"));
|
helpMenu->Append(MMBoard_About, wxT("&About...\tCtrl-A"), wxT("Show about dialog"));
|
||||||
|
|
||||||
menuFile->Append(MMBoard_Open, _T("&Open\tAlt-O"), _T("Open file"));
|
menuFile->Append(MMBoard_Open, wxT("&Open\tAlt-O"), wxT("Open file"));
|
||||||
menuFile->AppendSeparator();
|
menuFile->AppendSeparator();
|
||||||
menuFile->Append(MMBoard_Quit, _T("E&xit\tAlt-X"), _T("Quit this program"));
|
menuFile->Append(MMBoard_Quit, wxT("E&xit\tAlt-X"), wxT("Quit this program"));
|
||||||
|
|
||||||
// now append the freshly created menu to the menu bar...
|
// now append the freshly created menu to the menu bar...
|
||||||
wxMenuBar *menuBar = new wxMenuBar();
|
wxMenuBar *menuBar = new wxMenuBar();
|
||||||
menuBar->Append(menuFile, _T("&File"));
|
menuBar->Append(menuFile, wxT("&File"));
|
||||||
menuBar->Append(helpMenu, _T("&Help"));
|
menuBar->Append(helpMenu, wxT("&Help"));
|
||||||
|
|
||||||
// ... and attach this menu bar to the frame
|
// ... and attach this menu bar to the frame
|
||||||
SetMenuBar(menuBar);
|
SetMenuBar(menuBar);
|
||||||
@ -264,7 +267,7 @@ MMBoardFrame::MMBoardFrame(const wxString& title, const wxPoint& pos, const wxSi
|
|||||||
#if wxUSE_STATUSBAR
|
#if wxUSE_STATUSBAR
|
||||||
// create a status bar just for fun (by default with 1 pane only)
|
// create a status bar just for fun (by default with 1 pane only)
|
||||||
CreateStatusBar(3);
|
CreateStatusBar(3);
|
||||||
SetStatusText(_T("Welcome to wxWindows!"));
|
SetStatusText(wxT("Welcome to wxWindows!"));
|
||||||
#endif // wxUSE_STATUSBAR
|
#endif // wxUSE_STATUSBAR
|
||||||
|
|
||||||
// Misc variables
|
// Misc variables
|
||||||
@ -277,6 +280,7 @@ MMBoardFrame::MMBoardFrame(const wxString& title, const wxPoint& pos, const wxSi
|
|||||||
wxDefaultPosition, wxSize(300, -1),
|
wxDefaultPosition, wxSize(300, -1),
|
||||||
wxSL_HORIZONTAL | wxSL_AUTOTICKS);
|
wxSL_HORIZONTAL | wxSL_AUTOTICKS);
|
||||||
m_positionSlider->SetPageSize(60); // 60 secs
|
m_positionSlider->SetPageSize(60); // 60 secs
|
||||||
|
m_positionSlider->Enable(FALSE);
|
||||||
|
|
||||||
// Initialize info panel
|
// Initialize info panel
|
||||||
wxPanel *infoPanel = new wxPanel( m_panel, -1);
|
wxPanel *infoPanel = new wxPanel( m_panel, -1);
|
||||||
@ -285,7 +289,7 @@ MMBoardFrame::MMBoardFrame(const wxString& title, const wxPoint& pos, const wxSi
|
|||||||
|
|
||||||
wxBoxSizer *infoSizer = new wxBoxSizer(wxVERTICAL);
|
wxBoxSizer *infoSizer = new wxBoxSizer(wxVERTICAL);
|
||||||
|
|
||||||
m_fileType = new wxStaticText(infoPanel, -1, _T(""));
|
m_fileType = new wxStaticText(infoPanel, -1, wxT(""));
|
||||||
wxStaticLine *line = new wxStaticLine(infoPanel, -1);
|
wxStaticLine *line = new wxStaticLine(infoPanel, -1);
|
||||||
m_infoText = new wxStaticText(infoPanel, -1, "");
|
m_infoText = new wxStaticText(infoPanel, -1, "");
|
||||||
|
|
||||||
@ -387,9 +391,9 @@ void MMBoardFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
|
|||||||
void MMBoardFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
|
void MMBoardFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
wxString msg;
|
wxString msg;
|
||||||
msg.Printf( _T("wxWindows Multimedia board v1.0a, wxMMedia v2.0a:\n")
|
msg.Printf( wxT("wxWindows Multimedia board v1.0a, wxMMedia v2.0a:\n")
|
||||||
_T("an example of the capabilities of the wxWindows multimedia classes.\n")
|
wxT("an example of the capabilities of the wxWindows multimedia classes.\n")
|
||||||
_T("Copyright 1999, 2000, Guilhem Lavaux.\n"));
|
wxT("Copyright 1999, 2000, Guilhem Lavaux.\n"));
|
||||||
|
|
||||||
wxMessageBox(msg, "About MMBoard", wxOK | wxICON_INFORMATION, this);
|
wxMessageBox(msg, "About MMBoard", wxOK | wxICON_INFORMATION, this);
|
||||||
}
|
}
|
||||||
@ -430,6 +434,7 @@ void MMBoardFrame::OnOpen(wxCommandEvent& WXUNUSED(event))
|
|||||||
// Enable a few buttons
|
// Enable a few buttons
|
||||||
m_playButton->Enable(TRUE);
|
m_playButton->Enable(TRUE);
|
||||||
m_ejectButton->Enable(TRUE);
|
m_ejectButton->Enable(TRUE);
|
||||||
|
m_positionSlider->Enable(TRUE);
|
||||||
|
|
||||||
if (m_opened_file->NeedWindow()) {
|
if (m_opened_file->NeedWindow()) {
|
||||||
OpenVideoWindow();
|
OpenVideoWindow();
|
||||||
@ -443,14 +448,14 @@ void MMBoardFrame::UpdateInfoText()
|
|||||||
wxString infotext1, infotext2;
|
wxString infotext1, infotext2;
|
||||||
|
|
||||||
if (m_opened_file) {
|
if (m_opened_file) {
|
||||||
infotext1 = _T("File type:\n\t");
|
infotext1 = wxT("File type:\n\t");
|
||||||
infotext1 += m_opened_file->GetStringType() + _T("\n");
|
infotext1 += m_opened_file->GetStringType() + wxT("\n");
|
||||||
|
|
||||||
infotext2 = _T("File informations:\n\n");
|
infotext2 = wxT("File informations:\n\n");
|
||||||
infotext2 += m_opened_file->GetStringInformation();
|
infotext2 += m_opened_file->GetStringInformation();
|
||||||
} else {
|
} else {
|
||||||
infotext1 = _T("File type: \n\tNo file opened");
|
infotext1 = wxT("File type: \n\tNo file opened");
|
||||||
infotext2 = _T("File informations:\nNo information\n\n\n\n\n");
|
infotext2 = wxT("File informations:\nNo information\n\n\n\n\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
m_fileType->SetLabel(infotext1);
|
m_fileType->SetLabel(infotext1);
|
||||||
@ -465,10 +470,13 @@ void MMBoardFrame::UpdateMMedInfo()
|
|||||||
if (m_opened_file) {
|
if (m_opened_file) {
|
||||||
current = m_opened_file->GetPosition();
|
current = m_opened_file->GetPosition();
|
||||||
length = m_opened_file->GetLength();
|
length = m_opened_file->GetLength();
|
||||||
|
} else {
|
||||||
|
current.hours = current.minutes = current.seconds = 0;
|
||||||
|
length = current;
|
||||||
}
|
}
|
||||||
|
|
||||||
// We refresh the status bar
|
// We refresh the status bar
|
||||||
temp_string.Printf("%02d:%02d / %02d:%02d", current.hours * 60 + current.minutes,
|
temp_string.Printf(wxT("%02d:%02d / %02d:%02d"), current.hours * 60 + current.minutes,
|
||||||
current.seconds, length.hours * 60 + length.minutes, length.seconds);
|
current.seconds, length.hours * 60 + length.minutes, length.seconds);
|
||||||
SetStatusText(temp_string, 1);
|
SetStatusText(temp_string, 1);
|
||||||
|
|
||||||
@ -529,3 +537,35 @@ void MMBoardFrame::OnPause(wxCommandEvent& WXUNUSED(event))
|
|||||||
m_playButton->Enable(TRUE);
|
m_playButton->Enable(TRUE);
|
||||||
m_pauseButton->Enable(FALSE);
|
m_pauseButton->Enable(FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MMBoardFrame::OnEject(wxCommandEvent& WXUNUSED(event))
|
||||||
|
{
|
||||||
|
m_opened_file->Stop();
|
||||||
|
|
||||||
|
delete m_opened_file;
|
||||||
|
m_opened_file = NULL;
|
||||||
|
|
||||||
|
m_playButton->Enable(FALSE);
|
||||||
|
m_pauseButton->Enable(FALSE);
|
||||||
|
m_stopButton->Enable(FALSE);
|
||||||
|
m_ejectButton->Enable(FALSE);
|
||||||
|
m_positionSlider->Enable(FALSE);
|
||||||
|
|
||||||
|
UpdateInfoText();
|
||||||
|
UpdateMMedInfo();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MMBoardFrame::OnSetPosition(wxCommandEvent& WXUNUSED(event))
|
||||||
|
{
|
||||||
|
wxUint32 itime;
|
||||||
|
MMBoardTime btime;
|
||||||
|
|
||||||
|
itime = m_positionSlider->GetValue();
|
||||||
|
btime.seconds = itime % 60;
|
||||||
|
btime.minutes = (itime / 60) % 60;
|
||||||
|
btime.hours = itime / 3600;
|
||||||
|
m_opened_file->SetPosition(btime);
|
||||||
|
|
||||||
|
UpdateMMedInfo();
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -31,11 +31,13 @@
|
|||||||
wxSoundAiff::wxSoundAiff(wxInputStream& stream, wxSoundStream& io_sound)
|
wxSoundAiff::wxSoundAiff(wxInputStream& stream, wxSoundStream& io_sound)
|
||||||
: wxSoundFileStream(stream, io_sound)
|
: wxSoundFileStream(stream, io_sound)
|
||||||
{
|
{
|
||||||
|
m_base_offset = wxInvalidOffset;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxSoundAiff::wxSoundAiff(wxOutputStream& stream, wxSoundStream& io_sound)
|
wxSoundAiff::wxSoundAiff(wxOutputStream& stream, wxSoundStream& io_sound)
|
||||||
: wxSoundFileStream(stream, io_sound)
|
: wxSoundFileStream(stream, io_sound)
|
||||||
{
|
{
|
||||||
|
m_base_offset = wxInvalidOffset;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxSoundAiff::~wxSoundAiff()
|
wxSoundAiff::~wxSoundAiff()
|
||||||
@ -146,6 +148,7 @@ bool wxSoundAiff::PrepareToPlay()
|
|||||||
// m_input->SeekI(4, wxFromCurrent); // Pass an INT32
|
// m_input->SeekI(4, wxFromCurrent); // Pass an INT32
|
||||||
// m_input->SeekI(len-4, wxFromCurrent); // Pass the rest
|
// m_input->SeekI(len-4, wxFromCurrent); // Pass the rest
|
||||||
m_input->SeekI(ssnd + 4, wxFromCurrent);
|
m_input->SeekI(ssnd + 4, wxFromCurrent);
|
||||||
|
m_base_offset = m_input->TellI();
|
||||||
FinishPreparation(len - 8);
|
FinishPreparation(len - 8);
|
||||||
end_headers = TRUE;
|
end_headers = TRUE;
|
||||||
break;
|
break;
|
||||||
@ -158,7 +161,7 @@ bool wxSoundAiff::PrepareToPlay()
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxSoundAiff::PrepareToRecord(unsigned long time)
|
bool wxSoundAiff::PrepareToRecord(wxUint32 time)
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@ -170,6 +173,14 @@ bool wxSoundAiff::FinishRecording()
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool wxSoundAiff::RepositionStream(wxUint32 position)
|
||||||
|
{
|
||||||
|
if (m_base_offset == wxInvalidOffset)
|
||||||
|
return FALSE;
|
||||||
|
m_input->SeekI(m_base_offset, wxFromStart);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
wxUint32 wxSoundAiff::GetData(void *buffer, wxUint32 len)
|
wxUint32 wxSoundAiff::GetData(void *buffer, wxUint32 len)
|
||||||
{
|
{
|
||||||
return m_input->Read(buffer, len).LastRead();
|
return m_input->Read(buffer, len).LastRead();
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
class wxSoundAiff: public wxSoundFileStream {
|
class wxSoundAiff: public wxSoundFileStream {
|
||||||
public:
|
public:
|
||||||
wxSoundAiff(wxInputStream& stream, wxSoundStream& io_sound);
|
wxSoundAiff(wxInputStream& stream, wxSoundStream& io_sound);
|
||||||
wxSoundAiff(wxOutputStream& stream, wxSoundStream& io_sound);
|
wxSoundAiff(wxOutputStream& stream, wxSoundStream& io_sound);
|
||||||
~wxSoundAiff();
|
~wxSoundAiff();
|
||||||
@ -30,13 +30,16 @@ class wxSoundAiff: public wxSoundFileStream {
|
|||||||
bool CanRead();
|
bool CanRead();
|
||||||
wxString GetCodecName() const;
|
wxString GetCodecName() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool PrepareToPlay();
|
bool PrepareToPlay();
|
||||||
bool PrepareToRecord(unsigned long time);
|
bool PrepareToRecord(wxUint32 time);
|
||||||
bool FinishRecording();
|
bool FinishRecording();
|
||||||
|
bool RepositionStream(wxUint32 position);
|
||||||
|
|
||||||
wxUint32 GetData(void *buffer, wxUint32 len);
|
wxUint32 GetData(void *buffer, wxUint32 len);
|
||||||
wxUint32 PutData(const void *buffer, wxUint32 len);
|
wxUint32 PutData(const void *buffer, wxUint32 len);
|
||||||
|
protected:
|
||||||
|
off_t m_base_offset;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -37,7 +37,8 @@ typedef enum {
|
|||||||
wxSOUND_NOFORMAT,
|
wxSOUND_NOFORMAT,
|
||||||
wxSOUND_PCM,
|
wxSOUND_PCM,
|
||||||
wxSOUND_ULAW,
|
wxSOUND_ULAW,
|
||||||
wxSOUND_G72X
|
wxSOUND_G72X,
|
||||||
|
wxSOUND_MSADPCM
|
||||||
} wxSoundFormatType;
|
} wxSoundFormatType;
|
||||||
|
|
||||||
// ---------------------
|
// ---------------------
|
||||||
|
@ -83,7 +83,9 @@ bool wxSoundRouterStream::SetSoundFormat(const wxSoundFormatBase& format)
|
|||||||
if (m_router)
|
if (m_router)
|
||||||
delete m_router;
|
delete m_router;
|
||||||
|
|
||||||
|
// First, we try to setup the sound device
|
||||||
if (m_sndio->SetSoundFormat(format)) {
|
if (m_sndio->SetSoundFormat(format)) {
|
||||||
|
// We are lucky, it is working.
|
||||||
wxSoundStream::SetSoundFormat(m_sndio->GetSoundFormat());
|
wxSoundStream::SetSoundFormat(m_sndio->GetSoundFormat());
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -165,7 +167,6 @@ bool wxSoundRouterStream::StopProduction()
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// --------------------------------------------------------------------------
|
// --------------------------------------------------------------------------
|
||||||
// wxSoundFileStream: generic reader
|
// wxSoundFileStream: generic reader
|
||||||
// --------------------------------------------------------------------------
|
// --------------------------------------------------------------------------
|
||||||
@ -213,7 +214,7 @@ bool wxSoundFileStream::Play()
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxSoundFileStream::Record(unsigned long time)
|
bool wxSoundFileStream::Record(wxUint32 time)
|
||||||
{
|
{
|
||||||
if (m_state != wxSOUND_FILE_STOPPED)
|
if (m_state != wxSOUND_FILE_STOPPED)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@ -346,6 +347,9 @@ wxUint32 wxSoundFileStream::SetPosition(wxUint32 new_position)
|
|||||||
if (!m_prepared)
|
if (!m_prepared)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
if (!RepositionStream(new_position))
|
||||||
|
return m_length-m_bytes_left;
|
||||||
|
|
||||||
if (new_position >= m_length) {
|
if (new_position >= m_length) {
|
||||||
m_bytes_left = 0;
|
m_bytes_left = 0;
|
||||||
return m_length;
|
return m_length;
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
#include "sndbase.h"
|
#include "sndbase.h"
|
||||||
#include "sndcodec.h"
|
#include "sndcodec.h"
|
||||||
|
|
||||||
#define wxSOUND_INFINITE_TIME ((unsigned long)-1)
|
#define wxSOUND_INFINITE_TIME ((wxUint32)-1)
|
||||||
|
|
||||||
//
|
//
|
||||||
// Codec router class
|
// Codec router class
|
||||||
@ -51,14 +51,14 @@ typedef enum {
|
|||||||
//
|
//
|
||||||
|
|
||||||
class wxSoundFileStream: public wxSoundStream {
|
class wxSoundFileStream: public wxSoundStream {
|
||||||
public:
|
public:
|
||||||
wxSoundFileStream(wxInputStream& stream, wxSoundStream& io_sound);
|
wxSoundFileStream(wxInputStream& stream, wxSoundStream& io_sound);
|
||||||
wxSoundFileStream(wxOutputStream& stream, wxSoundStream& io_sound);
|
wxSoundFileStream(wxOutputStream& stream, wxSoundStream& io_sound);
|
||||||
~wxSoundFileStream();
|
~wxSoundFileStream();
|
||||||
|
|
||||||
// Usual sound file calls (Play, Stop, ...)
|
// Usual sound file calls (Play, Stop, ...)
|
||||||
bool Play();
|
bool Play();
|
||||||
bool Record(unsigned long time);
|
bool Record(wxUint32 time);
|
||||||
bool Stop();
|
bool Stop();
|
||||||
bool Pause();
|
bool Pause();
|
||||||
bool Resume();
|
bool Resume();
|
||||||
@ -67,26 +67,28 @@ class wxSoundFileStream: public wxSoundStream {
|
|||||||
bool IsStopped() const { return m_state == wxSOUND_FILE_STOPPED; }
|
bool IsStopped() const { return m_state == wxSOUND_FILE_STOPPED; }
|
||||||
bool IsPaused() const { return m_state == wxSOUND_FILE_PAUSED; }
|
bool IsPaused() const { return m_state == wxSOUND_FILE_PAUSED; }
|
||||||
|
|
||||||
// A user should not call these two functions. Several things must be done before calling them.
|
// A user should not call these two functions.
|
||||||
|
// Several things must be done before calling them.
|
||||||
// Users should use Play(), ...
|
// Users should use Play(), ...
|
||||||
bool StartProduction(int evt);
|
bool StartProduction(int evt);
|
||||||
bool StopProduction();
|
bool StopProduction();
|
||||||
|
|
||||||
// These three functions deals with the length, the position in the sound file.
|
// These three functions deals with the length, the position in the sound file.
|
||||||
// All the values are expressed in bytes. If you need the values expressed in terms of
|
// All the values are expressed in bytes. If you need the values expressed
|
||||||
// time, you have to use GetSoundFormat().GetTimeFromBytes(...)
|
// in terms of time, you have to use GetSoundFormat().GetTimeFromBytes(...)
|
||||||
wxUint32 GetLength();
|
wxUint32 GetLength();
|
||||||
wxUint32 GetPosition();
|
wxUint32 GetPosition();
|
||||||
wxUint32 SetPosition(wxUint32 new_position);
|
wxUint32 SetPosition(wxUint32 new_position);
|
||||||
|
|
||||||
// These two functions use the sound format specified by GetSoundFormat(). All samples
|
// These two functions use the sound format specified by GetSoundFormat().
|
||||||
// must be encoded in that format.
|
// All samples must be encoded in that format.
|
||||||
wxSoundStream& Read(void *buffer, wxUint32 len);
|
wxSoundStream& Read(void *buffer, wxUint32 len);
|
||||||
wxSoundStream& Write(const void *buffer, wxUint32 len);
|
wxSoundStream& Write(const void *buffer, wxUint32 len);
|
||||||
|
|
||||||
// This function set the sound format of the file. !! It must be used only when you are
|
// This function set the sound format of the file. !! It must be used only
|
||||||
// in output mode (concerning the file) !! If you are in input mode (concerning the file)
|
// when you are in output mode (concerning the file) !! If you are in
|
||||||
// You can't use this function to modify the format of the samples returned by Read() !
|
// input mode (concerning the file) you can't use this function to modify
|
||||||
|
// the format of the samples returned by Read() !
|
||||||
// For this action, you must use wxSoundRouterStream applied to wxSoundFileStream.
|
// For this action, you must use wxSoundRouterStream applied to wxSoundFileStream.
|
||||||
bool SetSoundFormat(const wxSoundFormatBase& format);
|
bool SetSoundFormat(const wxSoundFormatBase& format);
|
||||||
|
|
||||||
@ -94,11 +96,11 @@ class wxSoundFileStream: public wxSoundStream {
|
|||||||
// a player (But also in some other case).
|
// a player (But also in some other case).
|
||||||
virtual wxString GetCodecName() const;
|
virtual wxString GetCodecName() const;
|
||||||
|
|
||||||
// You should use this function to test whether this file codec can read the stream you passed
|
// You should use this function to test whether this file codec can read
|
||||||
// to it.
|
// the stream you passed to it.
|
||||||
virtual bool CanRead() { return FALSE; }
|
virtual bool CanRead() { return FALSE; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
wxSoundRouterStream m_codec;
|
wxSoundRouterStream m_codec;
|
||||||
wxSoundStream *m_sndio;
|
wxSoundStream *m_sndio;
|
||||||
wxInputStream *m_input;
|
wxInputStream *m_input;
|
||||||
@ -108,10 +110,11 @@ class wxSoundFileStream: public wxSoundStream {
|
|||||||
wxUint32 m_length, m_bytes_left;
|
wxUint32 m_length, m_bytes_left;
|
||||||
bool m_prepared;
|
bool m_prepared;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual bool PrepareToPlay() = 0;
|
virtual bool PrepareToPlay() = 0;
|
||||||
virtual bool PrepareToRecord(unsigned long time) = 0;
|
virtual bool PrepareToRecord(wxUint32 time) = 0;
|
||||||
virtual bool FinishRecording() = 0;
|
virtual bool FinishRecording() = 0;
|
||||||
|
virtual bool RepositionStream(wxUint32 position) = 0;
|
||||||
void FinishPreparation(wxUint32 len);
|
void FinishPreparation(wxUint32 len);
|
||||||
|
|
||||||
virtual wxUint32 GetData(void *buffer, wxUint32 len) = 0;
|
virtual wxUint32 GetData(void *buffer, wxUint32 len) = 0;
|
||||||
|
@ -10,6 +10,10 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <wx/wxprec.h>
|
#include <wx/wxprec.h>
|
||||||
|
|
||||||
|
#ifndef WX_PRECOMP
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "sndbase.h"
|
#include "sndbase.h"
|
||||||
#include "sndfile.h"
|
#include "sndfile.h"
|
||||||
#include "sndpcm.h"
|
#include "sndpcm.h"
|
||||||
@ -84,6 +88,7 @@ wxSoundStreamUlaw::~wxSoundStreamUlaw()
|
|||||||
|
|
||||||
wxSoundStream& wxSoundStreamUlaw::Read(void *buffer, wxUint32 len)
|
wxSoundStream& wxSoundStreamUlaw::Read(void *buffer, wxUint32 len)
|
||||||
{
|
{
|
||||||
|
// TODO
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,7 +12,6 @@
|
|||||||
#pragma interface "sndulaw.h"
|
#pragma interface "sndulaw.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <stddef.h>
|
|
||||||
#include "sndcodec.h"
|
#include "sndcodec.h"
|
||||||
#include "sndbase.h"
|
#include "sndbase.h"
|
||||||
|
|
||||||
@ -27,6 +26,9 @@ class WXDLLEXPORT wxSoundFormatUlaw: public wxSoundFormatBase {
|
|||||||
void SetSampleRate(wxUint32 srate);
|
void SetSampleRate(wxUint32 srate);
|
||||||
wxUint32 GetSampleRate() const;
|
wxUint32 GetSampleRate() const;
|
||||||
|
|
||||||
|
void SetChannels(wxUint8 channels);
|
||||||
|
wxUint8 GetChannels() const;
|
||||||
|
|
||||||
wxSoundFormatType GetType() const { return wxSOUND_ULAW; }
|
wxSoundFormatType GetType() const { return wxSOUND_ULAW; }
|
||||||
wxSoundFormatBase *Clone() const;
|
wxSoundFormatBase *Clone() const;
|
||||||
|
|
||||||
|
@ -31,17 +31,19 @@
|
|||||||
#define DATA_SIGNATURE BUILD_SIGNATURE('d','a','t','a')
|
#define DATA_SIGNATURE BUILD_SIGNATURE('d','a','t','a')
|
||||||
|
|
||||||
#define HEADER_SIZE 4+4 + 4+4+16 + 4+4
|
#define HEADER_SIZE 4+4 + 4+4+16 + 4+4
|
||||||
// 4+4 => NAME + LEN
|
// 4+4 => NAME + LEN
|
||||||
// 16 => fmt size
|
// 16 => fmt size
|
||||||
|
|
||||||
wxSoundWave::wxSoundWave(wxInputStream& stream, wxSoundStream& io_sound)
|
wxSoundWave::wxSoundWave(wxInputStream& stream, wxSoundStream& io_sound)
|
||||||
: wxSoundFileStream(stream, io_sound)
|
: wxSoundFileStream(stream, io_sound)
|
||||||
{
|
{
|
||||||
|
m_base_offset = wxInvalidOffset;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxSoundWave::wxSoundWave(wxOutputStream& stream, wxSoundStream& io_sound)
|
wxSoundWave::wxSoundWave(wxOutputStream& stream, wxSoundStream& io_sound)
|
||||||
: wxSoundFileStream(stream, io_sound)
|
: wxSoundFileStream(stream, io_sound)
|
||||||
{
|
{
|
||||||
|
m_base_offset = wxInvalidOffset;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxSoundWave::~wxSoundWave()
|
wxSoundWave::~wxSoundWave()
|
||||||
@ -60,6 +62,8 @@ bool wxSoundWave::CanRead()
|
|||||||
wxUint32 len, signature1, signature2;
|
wxUint32 len, signature1, signature2;
|
||||||
m_snderror = wxSOUND_NOERR;
|
m_snderror = wxSOUND_NOERR;
|
||||||
|
|
||||||
|
// Test the main signatures:
|
||||||
|
// "RIFF"
|
||||||
FAIL_WITH(m_input->Read(&signature1, 4).LastRead() != 4, wxSOUND_INVSTRM);
|
FAIL_WITH(m_input->Read(&signature1, 4).LastRead() != 4, wxSOUND_INVSTRM);
|
||||||
|
|
||||||
if (wxUINT32_SWAP_ON_BE(signature1) != RIFF_SIGNATURE) {
|
if (wxUINT32_SWAP_ON_BE(signature1) != RIFF_SIGNATURE) {
|
||||||
@ -67,14 +71,18 @@ bool wxSoundWave::CanRead()
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Pass the global length
|
||||||
m_input->Read(&len, 4);
|
m_input->Read(&len, 4);
|
||||||
FAIL_WITH(m_input->LastRead() != 4, wxSOUND_INVSTRM);
|
FAIL_WITH(m_input->LastRead() != 4, wxSOUND_INVSTRM);
|
||||||
|
|
||||||
|
// Get the second signature
|
||||||
FAIL_WITH(m_input->Read(&signature2, 4).LastRead() != 4, wxSOUND_INVSTRM);
|
FAIL_WITH(m_input->Read(&signature2, 4).LastRead() != 4, wxSOUND_INVSTRM);
|
||||||
|
// Ungetch all
|
||||||
m_input->Ungetch(&signature2, 4);
|
m_input->Ungetch(&signature2, 4);
|
||||||
m_input->Ungetch(&len, 4);
|
m_input->Ungetch(&len, 4);
|
||||||
m_input->Ungetch(&signature1, 4);
|
m_input->Ungetch(&signature1, 4);
|
||||||
|
|
||||||
|
// Test the second signature
|
||||||
if (wxUINT32_SWAP_ON_BE(signature2) != WAVE_SIGNATURE)
|
if (wxUINT32_SWAP_ON_BE(signature2) != WAVE_SIGNATURE)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
@ -127,6 +135,7 @@ bool wxSoundWave::PrepareToPlay()
|
|||||||
wxDataInputStream data(*m_input);
|
wxDataInputStream data(*m_input);
|
||||||
data.BigEndianOrdered(FALSE);
|
data.BigEndianOrdered(FALSE);
|
||||||
|
|
||||||
|
// Get the first signature
|
||||||
FAIL_WITH(m_input->Read(&signature, 4).LastRead() != 4, wxSOUND_INVSTRM);
|
FAIL_WITH(m_input->Read(&signature, 4).LastRead() != 4, wxSOUND_INVSTRM);
|
||||||
FAIL_WITH(wxUINT32_SWAP_ON_BE(signature) != RIFF_SIGNATURE, wxSOUND_INVSTRM);
|
FAIL_WITH(wxUINT32_SWAP_ON_BE(signature) != RIFF_SIGNATURE, wxSOUND_INVSTRM);
|
||||||
// "RIFF"
|
// "RIFF"
|
||||||
@ -135,11 +144,13 @@ bool wxSoundWave::PrepareToPlay()
|
|||||||
FAIL_WITH(m_input->LastRead() != 4, wxSOUND_INVSTRM);
|
FAIL_WITH(m_input->LastRead() != 4, wxSOUND_INVSTRM);
|
||||||
// dummy len
|
// dummy len
|
||||||
|
|
||||||
|
// Get the second signature
|
||||||
FAIL_WITH(m_input->Read(&signature, 4).LastRead() != 4, wxSOUND_INVSTRM);
|
FAIL_WITH(m_input->Read(&signature, 4).LastRead() != 4, wxSOUND_INVSTRM);
|
||||||
FAIL_WITH(wxUINT32_SWAP_ON_BE(signature) != WAVE_SIGNATURE, wxSOUND_INVSTRM);
|
FAIL_WITH(wxUINT32_SWAP_ON_BE(signature) != WAVE_SIGNATURE, wxSOUND_INVSTRM);
|
||||||
// "WAVE"
|
// "WAVE"
|
||||||
|
|
||||||
end_headers = FALSE;
|
end_headers = FALSE;
|
||||||
|
// Chunk loop
|
||||||
while (!end_headers) {
|
while (!end_headers) {
|
||||||
FAIL_WITH(m_input->Read(&signature, 4).LastRead() != 4, wxSOUND_INVSTRM);
|
FAIL_WITH(m_input->Read(&signature, 4).LastRead() != 4, wxSOUND_INVSTRM);
|
||||||
|
|
||||||
@ -151,16 +162,17 @@ bool wxSoundWave::PrepareToPlay()
|
|||||||
wxUint16 format, channels, byte_p_spl, bits_p_spl;
|
wxUint16 format, channels, byte_p_spl, bits_p_spl;
|
||||||
wxUint32 sample_fq, byte_p_sec;
|
wxUint32 sample_fq, byte_p_sec;
|
||||||
|
|
||||||
|
// Get the common parameters
|
||||||
data >> format >> channels >> sample_fq
|
data >> format >> channels >> sample_fq
|
||||||
>> byte_p_sec >> byte_p_spl >> bits_p_spl;
|
>> byte_p_sec >> byte_p_spl >> bits_p_spl;
|
||||||
|
|
||||||
switch (format) {
|
switch (format) {
|
||||||
case 0x01:
|
case 0x01: // PCM
|
||||||
if (!HandleOutputPCM(data, channels, sample_fq,
|
if (!HandleOutputPCM(data, channels, sample_fq,
|
||||||
byte_p_sec, byte_p_spl, bits_p_spl))
|
byte_p_sec, byte_p_spl, bits_p_spl))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
break;
|
break;
|
||||||
case 0x40:
|
case 0x40: // G721
|
||||||
if (!HandleOutputG721(data, channels, sample_fq,
|
if (!HandleOutputG721(data, channels, sample_fq,
|
||||||
byte_p_sec, byte_p_spl, bits_p_spl))
|
byte_p_sec, byte_p_spl, bits_p_spl))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@ -172,10 +184,12 @@ bool wxSoundWave::PrepareToPlay()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DATA_SIGNATURE: // "data"
|
case DATA_SIGNATURE: // "data"
|
||||||
|
m_base_offset = m_input->TellI();
|
||||||
end_headers = TRUE;
|
end_headers = TRUE;
|
||||||
FinishPreparation(len);
|
FinishPreparation(len);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
// We pass the chunk
|
||||||
m_input->SeekI(len, wxFromCurrent);
|
m_input->SeekI(len, wxFromCurrent);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -237,7 +251,7 @@ wxSoundFormatBase *wxSoundWave::HandleInputG72X(wxDataOutputStream& data)
|
|||||||
return g72x;
|
return g72x;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxSoundWave::PrepareToRecord(unsigned long time)
|
bool wxSoundWave::PrepareToRecord(wxUint32 time)
|
||||||
{
|
{
|
||||||
#define WRITE_SIGNATURE(s,sig) \
|
#define WRITE_SIGNATURE(s,sig) \
|
||||||
signature = sig; \
|
signature = sig; \
|
||||||
@ -293,6 +307,7 @@ FAIL_WITH(s->Write(&signature, 4).LastWrite() != 4, wxSOUND_INVSTRM);
|
|||||||
|
|
||||||
data << (fmt_data.GetSize() + m_sndformat->GetBytesFromTime(time));
|
data << (fmt_data.GetSize() + m_sndformat->GetBytesFromTime(time));
|
||||||
|
|
||||||
|
// We, finally, copy the header block to the output stream
|
||||||
{
|
{
|
||||||
char *out_buf;
|
char *out_buf;
|
||||||
out_buf = new char[fmt_data.GetSize()];
|
out_buf = new char[fmt_data.GetSize()];
|
||||||
@ -321,6 +336,14 @@ bool wxSoundWave::FinishRecording()
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool wxSoundWave::RepositionStream(wxUint32 position)
|
||||||
|
{
|
||||||
|
if (m_base_offset == wxInvalidOffset)
|
||||||
|
return FALSE;
|
||||||
|
m_input->SeekI(m_base_offset, wxFromStart);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
wxUint32 wxSoundWave::GetData(void *buffer, wxUint32 len)
|
wxUint32 wxSoundWave::GetData(void *buffer, wxUint32 len)
|
||||||
{
|
{
|
||||||
return m_input->Read(buffer, len).LastRead();
|
return m_input->Read(buffer, len).LastRead();
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
class wxSoundWave: public wxSoundFileStream {
|
class wxSoundWave: public wxSoundFileStream {
|
||||||
public:
|
public:
|
||||||
wxSoundWave(wxInputStream& stream, wxSoundStream& io_sound);
|
wxSoundWave(wxInputStream& stream, wxSoundStream& io_sound);
|
||||||
wxSoundWave(wxOutputStream& stream, wxSoundStream& io_sound);
|
wxSoundWave(wxOutputStream& stream, wxSoundStream& io_sound);
|
||||||
~wxSoundWave();
|
~wxSoundWave();
|
||||||
@ -32,10 +32,11 @@ class wxSoundWave: public wxSoundFileStream {
|
|||||||
bool CanRead();
|
bool CanRead();
|
||||||
wxString GetCodecName() const;
|
wxString GetCodecName() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool PrepareToPlay();
|
bool PrepareToPlay();
|
||||||
bool PrepareToRecord(unsigned long time);
|
bool PrepareToRecord(wxUint32 time);
|
||||||
bool FinishRecording();
|
bool FinishRecording();
|
||||||
|
bool RepositionStream(wxUint32 position);
|
||||||
|
|
||||||
wxUint32 GetData(void *buffer, wxUint32 len);
|
wxUint32 GetData(void *buffer, wxUint32 len);
|
||||||
wxUint32 PutData(const void *buffer, wxUint32 len);
|
wxUint32 PutData(const void *buffer, wxUint32 len);
|
||||||
@ -48,6 +49,9 @@ class wxSoundWave: public wxSoundFileStream {
|
|||||||
wxUint16 byte_p_spl, wxUint16 bits_p_spl);
|
wxUint16 byte_p_spl, wxUint16 bits_p_spl);
|
||||||
wxSoundFormatBase *HandleInputPCM(wxDataOutputStream& data);
|
wxSoundFormatBase *HandleInputPCM(wxDataOutputStream& data);
|
||||||
wxSoundFormatBase *HandleInputG72X(wxDataOutputStream& data);
|
wxSoundFormatBase *HandleInputG72X(wxDataOutputStream& data);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
off_t m_base_offset;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -286,8 +286,6 @@ class wxProcessFileInputStream: public wxInputStream {
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
size_t OnSysRead(void *buffer, size_t bufsize);
|
size_t OnSysRead(void *buffer, size_t bufsize);
|
||||||
off_t OnSysSeek(off_t seek, wxSeekMode mode);
|
|
||||||
off_t OnSysTell() const;
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
int m_fd;
|
int m_fd;
|
||||||
@ -300,8 +298,6 @@ class wxProcessFileOutputStream: public wxOutputStream {
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
size_t OnSysWrite(const void *buffer, size_t bufsize);
|
size_t OnSysWrite(const void *buffer, size_t bufsize);
|
||||||
off_t OnSysSeek(off_t seek, wxSeekMode mode);
|
|
||||||
off_t OnSysTell() const;
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
int m_fd;
|
int m_fd;
|
||||||
@ -332,18 +328,6 @@ size_t wxProcessFileInputStream::OnSysRead(void *buffer, size_t bufsize)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
off_t wxProcessFileInputStream::OnSysSeek(off_t WXUNUSED(seek),
|
|
||||||
wxSeekMode WXUNUSED(mode))
|
|
||||||
{
|
|
||||||
return wxInvalidOffset;
|
|
||||||
}
|
|
||||||
|
|
||||||
off_t wxProcessFileInputStream::OnSysTell() const
|
|
||||||
{
|
|
||||||
return wxInvalidOffset;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
wxProcessFileOutputStream::wxProcessFileOutputStream(int fd)
|
wxProcessFileOutputStream::wxProcessFileOutputStream(int fd)
|
||||||
{
|
{
|
||||||
m_fd = fd;
|
m_fd = fd;
|
||||||
@ -367,17 +351,6 @@ size_t wxProcessFileOutputStream::OnSysWrite(const void *buffer, size_t bufsize)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
off_t wxProcessFileOutputStream::OnSysSeek(off_t WXUNUSED(seek),
|
|
||||||
wxSeekMode WXUNUSED(mode))
|
|
||||||
{
|
|
||||||
return wxInvalidOffset;
|
|
||||||
}
|
|
||||||
|
|
||||||
off_t wxProcessFileOutputStream::OnSysTell() const
|
|
||||||
{
|
|
||||||
return wxInvalidOffset;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
long wxExecute(wxChar **argv,
|
long wxExecute(wxChar **argv,
|
||||||
|
Loading…
Reference in New Issue
Block a user