-#define RGB_TO_U_CCIR(r1, g1, b1, shift)\
-(((- FIX(0.16874*224.0/255.0) * r1 - FIX(0.33126*224.0/255.0) * g1 + \
- FIX(0.50000*224.0/255.0) * b1 + (ONE_HALF << shift) - 1) >> (SCALEBITS + shift)) + 128)
+ void make_silent ();
+ void make_silent (int c);
+
+ void copy_from (AudioBuffers* from, int frames_to_copy, int read_offset, int write_offset);
+ void move (int from, int to, int frames);
+ void accumulate (boost::shared_ptr<const AudioBuffers>, int, int);
+
+private:
+ /** Number of channels */
+ int _channels;
+ /** Number of frames (where a frame is one sample across all channels) */
+ int _frames;
+ /** Number of frames that _data can hold */
+ int _allocated_frames;
+ /** Audio data (so that, e.g. _data[2][6] is channel 2, sample 6) */
+ float** _data;
+};
+
+extern int64_t video_frames_to_audio_frames (ContentVideoFrame v, float audio_sample_rate, float frames_per_second);
+extern std::pair<std::string, int> cpu_info ();
+
+class LocaleGuard
+{
+public:
+ LocaleGuard ();
+ ~LocaleGuard ();
+
+private:
+ char* _old;
+};