annotate src/Modules/Output/OSCOutput.h @ 656:263a05be98c4

Unify naming scheme for test data and clean up code that generates it.
author ronw@google.com
date Thu, 27 Jun 2013 20:48:27 +0000
parents 0284d2152e17
children
rev   line source
tomwalters@509 1 // Copyright 2012, Tom Walters
tomwalters@509 2 //
tomwalters@509 3 // AIM-C: A C++ implementation of the Auditory Image Model
tomwalters@509 4 // http://www.acousticscale.org/AIMC
tomwalters@509 5 //
tomwalters@509 6 // Licensed under the Apache License, Version 2.0 (the "License");
tomwalters@509 7 // you may not use this file except in compliance with the License.
tomwalters@509 8 // You may obtain a copy of the License at
tomwalters@509 9 //
tomwalters@509 10 // http://www.apache.org/licenses/LICENSE-2.0
tomwalters@509 11 //
tomwalters@509 12 // Unless required by applicable law or agreed to in writing, software
tomwalters@509 13 // distributed under the License is distributed on an "AS IS" BASIS,
tomwalters@509 14 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
tomwalters@509 15 // See the License for the specific language governing permissions and
tomwalters@509 16 // limitations under the License.
tomwalters@509 17
tomwalters@509 18 /*!
tomwalters@509 19 * \author Tom Walters <tom@acousticscale.org>
tomwalters@509 20 * \date created 2012/02/17
tomwalters@509 21 * \version \$Id$
tomwalters@509 22 */
tomwalters@509 23
tomwalters@509 24 #ifndef AIMC_MODULES_OUTPUT_OSC_H_
tomwalters@509 25 #define AIMC_MODULES_OUTPUT_OSC_H_
tomwalters@509 26
tomwalters@509 27 #include "Support/Module.h"
tomwalters@509 28
tomwalters@509 29 #include <string>
tomwalters@509 30
tomwalters@509 31 #include "osc/OscOutboundPacketStream.h"
tomwalters@509 32 #include "ip/UdpSocket.h"
tomwalters@509 33
tomwalters@509 34 namespace aimc {
tomwalters@509 35 class OSCOutput : public Module {
tomwalters@509 36 public:
tomwalters@509 37 explicit OSCOutput(Parameters *pParam);
tomwalters@509 38 virtual ~OSCOutput();
tomwalters@509 39
tomwalters@509 40 /*! \brief Process a buffer
tomwalters@509 41 */
tomwalters@509 42 virtual void Process(const SignalBank &input);
tomwalters@509 43
tomwalters@509 44 private:
tomwalters@509 45 /*! \brief Reset the internal state of the module
tomwalters@509 46 */
tomwalters@509 47 virtual void ResetInternal();
tomwalters@509 48
tomwalters@509 49 /*! \brief Prepare the module
tomwalters@509 50 * \param input Input signal
tomwalters@509 51 * \param output true on success false on failure
tomwalters@509 52 */
tomwalters@509 53 virtual bool InitializeInternal(const SignalBank &input);
tomwalters@509 54
tomwalters@509 55 float sample_rate_;
tomwalters@509 56 int buffer_length_;
tomwalters@509 57 int channel_count_;
tomwalters@509 58 string address_;
tomwalters@509 59 int port_;
tomwalters@509 60 int output_buffer_size_;
tomwalters@509 61
tomwalters@509 62 UdpTransmitSocket* transmit_socket_;
tomwalters@509 63 osc::OutboundPacketStream* packet_stream_;
tomwalters@509 64 char* buffer_;
tomwalters@509 65 };
tomwalters@509 66 } // namespace aimc
tomwalters@509 67
tomwalters@509 68 #endif // AIMC_MODULES_OUTPUT_OSC_H_