~ubuntu-branches/ubuntu/lucid/ardour/lucid-proposed

« back to all changes in this revision

Viewing changes to libs/ardour/ardour/audioregion.h

  • Committer: Bazaar Package Importer
  • Author(s): Free Ekanayaka
  • Date: 2008-02-07 20:51:55 UTC
  • mfrom: (1.1.13 upstream)
  • Revision ID: james.westby@ubuntu.com-20080207205155-xzi5lq5s2o1okvx8
Tags: 1:2.3.1-1
* New upstream release
* debian/control:
   - build-depend on libfftw3-dev (Closes: #463803)
   - added Homepage, Vcs-Svn, Vcs-Browser
* debian/patches
   - dropped 50-soundtouch.patch (fixed upstream)
   - updated 80_ardourino.patch
   - dropped unused patches from source package

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#define __ardour_audio_region_h__
22
22
 
23
23
#include <vector>
 
24
#include <list>
24
25
 
25
26
#include <pbd/fastlog.h>
26
27
#include <pbd/undo.h>
59
60
        bool speed_mismatch (float) const;
60
61
 
61
62
        boost::shared_ptr<AudioSource> source (uint32_t n=0) const { if (n < sources.size()) return sources[n]; else return sources[0]; } 
 
63
        const SourceList& get_sources() const { return sources; }
62
64
 
63
65
        void set_scale_amplitude (gain_t);
64
66
        gain_t scale_amplitude() const { return _scale_amplitude; }
82
84
                        nframes_t offset, nframes_t cnt,
83
85
                        uint32_t chan_n=0, double samples_per_unit= 1.0) const;
84
86
 
 
87
        /* Readable interface */
 
88
        
 
89
        virtual nframes64_t read (Sample*, nframes64_t pos, nframes64_t cnt, int channel) const;
 
90
        virtual nframes64_t readable_length() const { return length(); }
 
91
 
85
92
        virtual nframes_t read_at (Sample *buf, Sample *mixdown_buf,
86
 
                        float *gain_buf, nframes_t position, nframes_t cnt, 
87
 
                        uint32_t       chan_n      = 0,
88
 
                        nframes_t read_frames = 0,
89
 
                        nframes_t skip_frames = 0) const;
 
93
                                   float *gain_buf, nframes_t position, nframes_t cnt, 
 
94
                                   uint32_t       chan_n      = 0,
 
95
                                   nframes_t read_frames = 0,
 
96
                                   nframes_t skip_frames = 0) const;
90
97
 
91
98
        nframes_t master_read_at (Sample *buf, Sample *mixdown_buf, 
92
99
                        float *gain_buf,
141
148
 
142
149
        void set_playlist (boost::weak_ptr<Playlist>);
143
150
 
 
151
        int get_transients (AnalysisFeatureList&, bool force_new = false);
 
152
 
144
153
  private:
145
154
        friend class RegionFactory;
146
155
 
147
156
        AudioRegion (boost::shared_ptr<AudioSource>, nframes_t start, nframes_t length);
148
157
        AudioRegion (boost::shared_ptr<AudioSource>, nframes_t start, nframes_t length, const string& name, layer_t = 0, Region::Flag flags = Region::DefaultFlags);
149
 
        AudioRegion (SourceList &, nframes_t start, nframes_t length, const string& name, layer_t = 0, Region::Flag flags = Region::DefaultFlags);
 
158
        AudioRegion (const SourceList &, nframes_t start, nframes_t length, const string& name, layer_t = 0, Region::Flag flags = Region::DefaultFlags);
150
159
        AudioRegion (boost::shared_ptr<const AudioRegion>, nframes_t start, nframes_t length, const string& name, layer_t = 0, Region::Flag flags = Region::DefaultFlags);
151
160
        AudioRegion (boost::shared_ptr<const AudioRegion>);
152
161
        AudioRegion (boost::shared_ptr<AudioSource>, const XMLNode&);
161
170
        void recompute_gain_at_start ();
162
171
 
163
172
        nframes_t _read_at (const SourceList&, Sample *buf, Sample *mixdown_buffer, 
164
 
                                 float *gain_buffer, nframes_t position, nframes_t cnt, 
165
 
                                 uint32_t chan_n = 0,
166
 
                                 nframes_t read_frames = 0,
167
 
                                 nframes_t skip_frames = 0) const;
 
173
                            float *gain_buffer, nframes_t position, nframes_t cnt, 
 
174
                            uint32_t chan_n = 0,
 
175
                            nframes_t read_frames = 0,
 
176
                            nframes_t skip_frames = 0,
 
177
                            bool raw = false) const;
168
178
 
169
179
        bool verify_start (nframes_t position);
170
180
        bool verify_length (nframes_t& length);
178
188
        void fade_out_changed ();
179
189
        void source_offset_changed ();
180
190
        void listen_to_my_curves ();
 
191
        void listen_to_my_sources ();
181
192
 
182
193
        void source_deleted ();
183
194