patch-mpegsound_mpegsound_h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. $OpenBSD: patch-mpegsound_mpegsound_h,v 1.1 2010/01/11 07:51:26 jakemsr Exp $
  2. --- mpegsound/mpegsound.h.orig Sat Jan 24 07:25:11 2009
  3. +++ mpegsound/mpegsound.h Sun Dec 27 16:39:14 2009
  4. @@ -433,6 +433,36 @@ class Rawplayer : public Soundplayer (private)
  5. #endif /* WANT_OSS */
  6. +#ifdef WANT_SNDIO
  7. +
  8. +// Class for playing raw data using sndio(7) audio
  9. +class Sndioplayer : public Soundplayer
  10. +{
  11. +public:
  12. + Sndioplayer();
  13. + ~Sndioplayer();
  14. +
  15. + void abort(void);
  16. + bool setsoundtype(int stereo, int samplesize, int speed);
  17. + void set8bitmode();
  18. + bool resetsoundtype(void);
  19. + void releasedevice(void);
  20. + bool attachdevice(void);
  21. +
  22. + bool putblock(void *buffer, int size);
  23. + int putblock_nt(void *buffer, int size);
  24. + int getblocksize(void);
  25. + int fix_samplesize(void *buffer, int size);
  26. +
  27. +private:
  28. + int rawblocksize;
  29. + struct sio_hdl *hdl;
  30. + int rawstereo, rawsamplesize, rawspeed, want8bit;
  31. + short forcetomono, forceto8;
  32. +};
  33. +
  34. +#endif /* WANT_SNDIO */
  35. +
  36. #ifdef WANT_ESD
  37. // Class for playing raw data via Enlightened Sound Daemon
  38. class EsdPlayer : public Soundplayer
  39. @@ -957,7 +987,7 @@ class Fileplayer
  40. {
  41. public:
  42. enum audiodriver_t {
  43. - AUDIODRV_OSS, AUDIODRV_ESD, AUDIODRV_SDL, AUDIODRV_NAS
  44. + AUDIODRV_OSS, AUDIODRV_ESD, AUDIODRV_SDL, AUDIODRV_NAS, AUDIODRV_SNDIO
  45. };
  46. virtual ~Fileplayer(); //anyone may destruct a FilePlayer object directly