Mercurial > hg > aimc
comparison src/Modules/Input/ModuleFileInput.h @ 7:1a1988ec40e7
- Replacing tabs with spaces for indentation
author | tomwalters |
---|---|
date | Thu, 18 Feb 2010 20:04:04 +0000 |
parents | decdac21cfc2 |
children | fcbf85ce59fb |
comparison
equal
deleted
inserted
replaced
6:8c859ef1fb75 | 7:1a1988ec40e7 |
---|---|
35 #include "Support/SignalBank.h" | 35 #include "Support/SignalBank.h" |
36 | 36 |
37 namespace aimc { | 37 namespace aimc { |
38 class ModuleFileInput : public Module { | 38 class ModuleFileInput : public Module { |
39 public: | 39 public: |
40 ModuleFileInput(Parameters *pParam); | 40 ModuleFileInput(Parameters *pParam); |
41 virtual ~ModuleFileInput(); | 41 virtual ~ModuleFileInput(); |
42 | 42 |
43 /*! \brief Initializes this input device using an audio file | 43 /*! \brief Initializes this input device using an audio file |
44 * \param sFilename Path of the file to load | 44 * \param sFilename Path of the file to load |
45 * \return true on success, false on error | 45 * \return true on success, false on error |
46 */ | 46 */ |
47 bool LoadFile(const char *sFilename); | 47 bool LoadFile(const char *sFilename); |
48 | 48 |
49 //! \brief Process the loaded file. | 49 //! \brief Process the loaded file. |
50 void Process(); | 50 void Process(); |
51 | 51 |
52 //! \brief Dummy Initialize function. Call LoadFile instead. | 52 //! \brief Dummy Initialize function. Call LoadFile instead. |
53 virtual bool Initialize(const SignalBank &input); | 53 virtual bool Initialize(const SignalBank &input); |
54 | 54 |
55 //! \brief Dummy funciton to comply with the Module specification. Gives an | 55 //! \brief Dummy funciton to comply with the Module specification. Gives an |
56 // error message when called. | 56 // error message when called. |
57 virtual void Process(const SignalBank &input); | 57 virtual void Process(const SignalBank &input); |
58 | 58 |
59 private: | 59 private: |
60 //! \brief Prepare the module | 60 //! \brief Prepare the module |
63 virtual bool InitializeInternal(const SignalBank &input); | 63 virtual bool InitializeInternal(const SignalBank &input); |
64 | 64 |
65 //! \brief Rewind to the start of the file | 65 //! \brief Rewind to the start of the file |
66 virtual void ResetInternal(); | 66 virtual void ResetInternal(); |
67 | 67 |
68 //! \brief File descriptor | 68 //! \brief File descriptor |
69 SNDFILE *file_handle_; | 69 SNDFILE *file_handle_; |
70 | 70 |
71 //! \brief Current position in time of the file | 71 //! \brief Current position in time of the file |
72 int file_position_samples_; | 72 int file_position_samples_; |
73 bool file_loaded_; | 73 bool file_loaded_; |
74 int audio_channels_; | 74 int audio_channels_; |
75 int buffer_length_; | 75 int buffer_length_; |
76 float sample_rate_; | 76 float sample_rate_; |