diff options
author | Taybin Rutkin <taybin@taybin.com> | 2006-06-27 21:57:15 +0000 |
---|---|---|
committer | Taybin Rutkin <taybin@taybin.com> | 2006-06-27 21:57:15 +0000 |
commit | fdda19d3d45384fb4f158e4f1af18cc17009e478 (patch) | |
tree | fbd818b6978bd392f082fbd0ef337ebb9948ef9b /libs/ardour/ardour/coreaudiosource.h | |
parent | 17916d84bc56bd3c18ce99343eda2f80066b1b64 (diff) |
CoreAudioSource moved to coreaudiosource.cc.
Compiles with new libsndfile class hierarchy.
git-svn-id: svn://localhost/ardour2/trunk@647 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour/coreaudiosource.h')
-rw-r--r-- | libs/ardour/ardour/coreaudiosource.h | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/libs/ardour/ardour/coreaudiosource.h b/libs/ardour/ardour/coreaudiosource.h new file mode 100644 index 0000000000..ba9f122fc9 --- /dev/null +++ b/libs/ardour/ardour/coreaudiosource.h @@ -0,0 +1,61 @@ +/* + Copyright (C) 2000 Paul Davis + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +*/ + +#ifndef __coreaudio_source_h__ +#define __coreaudio_source_h__ + +#include <ardour/audiofilesource.h> +#include <AudioToolbox/ExtendedAudioFile.h> + +namespace ARDOUR { + +class CoreAudioSource : public AudioFileSource { + public: + CoreAudioSource (const XMLNode&); + CoreAudioSource (const string& path_plus_channel, Flag); + ~CoreAudioSource (); + + float sample_rate() const; + int update_header (jack_nframes_t when, struct tm&, time_t); + + int flush_header () {return 0;}; + void set_header_timeline_position () {}; + + protected: + jack_nframes_t read_unlocked (Sample *dst, jack_nframes_t start, jack_nframes_t cnt, char * workbuf) const; + + jack_nframes_t write_unlocked (Sample *dst, jack_nframes_t cnt, char * workbuf) + { return 0; } + + + private: + ExtAudioFileRef af; + uint16_t n_channels; + + mutable float *tmpbuf; + mutable jack_nframes_t tmpbufsize; + mutable Glib::Mutex _tmpbuf_lock; + + void init (const string &str); +}; + +}; /* namespace ARDOUR */ + +#endif /* __coreaudio_source_h__ */ + |