openbsd-ports/audio/mp3blaster/patches/patch-mpegsound_mpegsound_h
jakemsr 44cb065cc8 - update to mp3blaster-3.2.5
- add sndio audio to mp3blaster and splay programs
- implement nmixer as a generic midi volume controller, that defaults to
using the aucat:0 midi device
- stop using multiple threads for mpeg decoding.  they are poorly
implmented, just spinning and using all available cpu cycles

with feedback from naddy@ and ratchov@
2010-01-11 07:51:26 +00:00

50 lines
1.3 KiB
Plaintext

$OpenBSD: patch-mpegsound_mpegsound_h,v 1.1 2010/01/11 07:51:26 jakemsr Exp $
--- mpegsound/mpegsound.h.orig Sat Jan 24 07:25:11 2009
+++ mpegsound/mpegsound.h Sun Dec 27 16:39:14 2009
@@ -433,6 +433,36 @@ class Rawplayer : public Soundplayer (private)
#endif /* WANT_OSS */
+#ifdef WANT_SNDIO
+
+// Class for playing raw data using sndio(7) audio
+class Sndioplayer : public Soundplayer
+{
+public:
+ Sndioplayer();
+ ~Sndioplayer();
+
+ void abort(void);
+ bool setsoundtype(int stereo, int samplesize, int speed);
+ void set8bitmode();
+ bool resetsoundtype(void);
+ void releasedevice(void);
+ bool attachdevice(void);
+
+ bool putblock(void *buffer, int size);
+ int putblock_nt(void *buffer, int size);
+ int getblocksize(void);
+ int fix_samplesize(void *buffer, int size);
+
+private:
+ int rawblocksize;
+ struct sio_hdl *hdl;
+ int rawstereo, rawsamplesize, rawspeed, want8bit;
+ short forcetomono, forceto8;
+};
+
+#endif /* WANT_SNDIO */
+
#ifdef WANT_ESD
// Class for playing raw data via Enlightened Sound Daemon
class EsdPlayer : public Soundplayer
@@ -957,7 +987,7 @@ class Fileplayer
{
public:
enum audiodriver_t {
- AUDIODRV_OSS, AUDIODRV_ESD, AUDIODRV_SDL, AUDIODRV_NAS
+ AUDIODRV_OSS, AUDIODRV_ESD, AUDIODRV_SDL, AUDIODRV_NAS, AUDIODRV_SNDIO
};
virtual ~Fileplayer(); //anyone may destruct a FilePlayer object directly