2004-10-19 09:40:30 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2005-01-18 16:14:27 -05:00
|
|
|
// Name: wx/palmos/sound.h
|
2004-10-19 09:40:30 -04:00
|
|
|
// Purpose: wxSound class
|
2005-01-18 16:14:27 -05:00
|
|
|
// Author: William Osborne - minimal working wxPalmOS port
|
2004-10-19 09:40:30 -04:00
|
|
|
// Modified by:
|
|
|
|
// Created: 10/13/04
|
2005-01-18 16:14:27 -05:00
|
|
|
// RCS-ID: $Id$
|
2004-10-19 09:40:30 -04:00
|
|
|
// Copyright: (c) William Osborne
|
|
|
|
// Licence: wxWindows licence
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_SOUND_H_
|
|
|
|
#define _WX_SOUND_H_
|
|
|
|
|
|
|
|
#if wxUSE_SOUND
|
|
|
|
|
|
|
|
#include "wx/object.h"
|
|
|
|
|
|
|
|
class WXDLLIMPEXP_ADV wxSound : public wxSoundBase
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
wxSound();
|
|
|
|
wxSound(const wxString& fileName, bool isResource = false);
|
|
|
|
wxSound(int size, const wxByte* data);
|
2006-09-05 16:47:48 -04:00
|
|
|
virtual ~wxSound();
|
2004-10-19 09:40:30 -04:00
|
|
|
|
|
|
|
public:
|
|
|
|
// Create from resource or file
|
|
|
|
bool Create(const wxString& fileName, bool isResource = false);
|
|
|
|
// Create from data
|
|
|
|
bool Create(int size, const wxByte* data);
|
|
|
|
|
|
|
|
bool IsOk() const { return (m_waveData ? true : false); };
|
2005-01-18 16:14:27 -05:00
|
|
|
|
2004-10-19 09:40:30 -04:00
|
|
|
static void Stop();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
bool Free();
|
2005-01-18 16:14:27 -05:00
|
|
|
|
2004-10-19 09:40:30 -04:00
|
|
|
bool DoPlay(unsigned flags) const;
|
|
|
|
|
|
|
|
private:
|
|
|
|
wxByte* m_waveData;
|
|
|
|
int m_waveLength;
|
|
|
|
bool m_isResource;
|
|
|
|
|
2009-02-08 06:45:59 -05:00
|
|
|
wxDECLARE_NO_COPY_CLASS(wxSound);
|
2004-10-19 09:40:30 -04:00
|
|
|
};
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|