1 /* 2 * output.h 3 * Copyright 2010-2013 John Lindgren 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are met: 7 * 8 * 1. Redistributions of source code must retain the above copyright notice, 9 * this list of conditions, and the following disclaimer. 10 * 11 * 2. Redistributions in binary form must reproduce the above copyright notice, 12 * this list of conditions, and the following disclaimer in the documentation 13 * provided with the distribution. 14 * 15 * This software is provided "as is" and without any warranty, express or 16 * implied. In no event shall the authors be liable for any damages arising from 17 * the use of this software. 18 */ 19 20 #ifndef LIBAUDCORE_OUTPUT_H 21 #define LIBAUDCORE_OUTPUT_H 22 23 #include <libaudcore/audio.h> 24 #include <libaudcore/objects.h> 25 26 class PluginHandle; 27 class Tuple; 28 29 void output_init(); 30 void output_cleanup(); 31 32 bool output_open_audio(const String & filename, const Tuple & tuple, int format, 33 int rate, int channels, int start_time, bool pause); 34 void output_set_tuple(const Tuple & tuple); 35 void output_set_replay_gain(const ReplayGainInfo & info); 36 bool output_write_audio(const void * data, int size, int stop_time); 37 void output_flush(int time, bool force = false); 38 void output_resume(); 39 void output_pause(bool pause); 40 41 int output_get_time(); 42 int output_get_raw_time(); 43 void output_close_audio(); 44 void output_drain(); 45 46 PluginHandle * output_plugin_get_current(); 47 PluginHandle * output_plugin_get_secondary(); 48 bool output_plugin_set_current(PluginHandle * plugin); 49 bool output_plugin_set_secondary(PluginHandle * plugin); 50 51 #endif 52