~ubuntu-branches/ubuntu/oneiric/muse/oneiric

« back to all changes in this revision

Viewing changes to muse/audioconvert.h

  • Committer: Bazaar Package Importer
  • Author(s): Fabrice Coutadeur
  • Date: 2010-11-17 21:43:38 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20101117214338-1hvfl7oo2dsqnvrb
Tags: 1.1-0ubuntu1
* New upstream release (LP: #668631)
* Switch to dpkg-source 3.0 (quilt) format
* Switch to dh7 short form
* debian/rules:
  - added --enable-dssi and --enable-osc to conf flags for dssi support
  - added -ljackserver to LDFLAGS to fix a FTBFS because of --as-needed
* debian/control:
  - added build build dependency on liblo-dev and dssi-dev for dssi support
  - bump Standards-version to 3.9.1. No changes required.
* debian/muse.desktop, debian/muse.xpm: dropped as desktop file and icon is
  now shipped upstream.
* fix-desktop-categories.patch: fix Categories tag in upstream desktop file
* 10_es_locale_fix.dpatch: refreshed and converted to quilt as
  fix_es_locale.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
#ifndef __AUDIOCONVERT_H__
12
12
#define __AUDIOCONVERT_H__
13
13
 
 
14
#include <map>
 
15
 
14
16
#ifdef RUBBERBAND_SUPPORT
15
17
#include <RubberBandStretcher.h>
16
18
#endif
18
20
#include <samplerate.h>
19
21
#include <sys/types.h>
20
22
 
 
23
//#include "eventbase.h"
 
24
class EventBase;
 
25
class EventList;
 
26
 
21
27
class SndFileR;
22
28
 
23
29
//---------------------------------------------------------
26
32
 
27
33
class AudioConverter
28
34
{
 
35
   protected:   
29
36
      int _refCount;
 
37
      off_t _sfCurFrame;
30
38
      
31
39
   public:   
32
40
      AudioConverter();
35
43
      AudioConverter* reference();
36
44
      static AudioConverter* release(AudioConverter* cv);
37
45
      
38
 
      off_t readAudio(SndFileR& /*sf*/, off_t /*sfCurFrame*/, unsigned /*offset*/, float** /*buffer*/, 
 
46
      //off_t readAudio(SndFileR& /*sf*/, off_t /*sfCurFrame*/, unsigned /*offset*/, float** /*buffer*/, 
 
47
      //                int /*channels*/, int /*frames*/, bool /*doSeek*/, bool /*overwrite*/);
 
48
      off_t readAudio(SndFileR& /*sf*/, unsigned /*offset*/, float** /*buffer*/, 
39
49
                      int /*channels*/, int /*frames*/, bool /*doSeek*/, bool /*overwrite*/);
40
50
      
41
51
      virtual bool isValid() = 0;
42
52
      virtual void reset() = 0;
43
53
      virtual void setChannels(int ch) = 0;
44
 
      virtual off_t process(SndFileR& /*sf*/, off_t /*sfCurFrame*/, float** /*buffer*/, 
 
54
      //virtual off_t process(SndFileR& /*sf*/, off_t /*sfCurFrame*/, float** /*buffer*/, 
 
55
      //                      int /*channels*/, int /*frames*/, bool /*overwrite*/) = 0; // Interleaved buffer if stereo.
 
56
      virtual off_t process(SndFileR& /*sf*/, float** /*buffer*/, 
45
57
                            int /*channels*/, int /*frames*/, bool /*overwrite*/) = 0; // Interleaved buffer if stereo.
46
58
};
47
59
 
62
74
      virtual bool isValid() { return _src_state != 0; }
63
75
      virtual void reset();
64
76
      virtual void setChannels(int ch);
65
 
      virtual off_t process(SndFileR& /*sf*/, off_t /*sfCurFrame*/, float** /*buffer*/, 
 
77
      //virtual off_t process(SndFileR& /*sf*/, off_t /*sfCurFrame*/, float** /*buffer*/, 
 
78
      //                      int /*channels*/, int /*frames*/, bool /*overwrite*/); // Interleaved buffer if stereo.
 
79
      virtual off_t process(SndFileR& /*sf*/, float** /*buffer*/, 
66
80
                            int /*channels*/, int /*frames*/, bool /*overwrite*/); // Interleaved buffer if stereo.
67
81
};
68
82
 
85
99
      virtual bool isValid() { return _rbs != 0; }
86
100
      virtual void reset();
87
101
      virtual void setChannels(int ch);
88
 
      virtual off_t process(SndFileR& /*sf*/, off_t /*sfCurFrame*/, float** /*buffer*/, 
 
102
      //virtual off_t process(SndFileR& /*sf*/, off_t /*sfCurFrame*/, float** /*buffer*/, 
 
103
      //                      int /*channels*/, int /*frames*/, bool /*overwrite*/); // Interleaved buffer if stereo.
 
104
      virtual off_t process(SndFileR& /*sf*/, float** /*buffer*/, 
89
105
                            int /*channels*/, int /*frames*/, bool /*overwrite*/); // Interleaved buffer if stereo.
90
106
};
91
107
 
92
108
#endif // RUBBERBAND_SUPPORT
93
109
 
 
110
//---------------------------------------------------------
 
111
//   AudioConvertMap
 
112
//---------------------------------------------------------
 
113
 
 
114
typedef std::map<EventBase*, AudioConverter*, std::less<EventBase*> >::iterator iAudioConvertMap;
 
115
typedef std::map<EventBase*, AudioConverter*, std::less<EventBase*> >::const_iterator ciAudioConvertMap;
 
116
 
 
117
//typedef std::map<EventBase*, AudioConverter*, std::less<EventBase*> > AudioConvertMap;
 
118
class AudioConvertMap : public std::map<EventBase*, AudioConverter*, std::less<EventBase*> > 
 
119
{
 
120
   public:
 
121
      void remapEvents(const EventList*);  
 
122
      iAudioConvertMap addEvent(EventBase*);
 
123
      void removeEvent(EventBase*);
 
124
      //AudioConverter* getConverter(const EventBase*);
 
125
      iAudioConvertMap getConverter(EventBase*);
 
126
};
 
127
 
94
128
#endif
95
129