view src/AOOptions.cpp @ 9:cf38ffea8def

Added AODevice and AODriver. Renamed AOOptions.cpp file.
author Eris Caffee <discordia@eldalin.com>
date Wed, 25 Mar 2015 16:25:10 -0500
parents
children
line source
1 #include "aopp.hpp"
2 #include <cstdio>
4 AOPP::AOOptions::AOOptions() :
5 options (NULL)
6 {
7 }
9 AOPP::AOOptions::~AOOptions() {
10 if ( options ) {
11 ao_free_options( options );
12 }
13 }
16 int AOPP::AOOptions::append( const char *key, const char *value ) {
17 if ( key && value ) {
18 return ao_append_option( &options, key, value );
19 }
20 return 0;
21 }
24 void AOPP::AOOptions::print_options(void) {
25 ao_option * opt = options;
26 while ( opt ) {
27 printf("%s\t\t%s\n", opt->key, opt->value);
28 opt = opt->next;
29 }
30 }