# HG changeset patch # User John Donoghue # Date 1420836408 18000 # Node ID 0d3e67f27d57d8e5b02710afebd05d1849a5cb89 # Parent e75df9e43e6303cacb78b24ede938e4cb0c6ab2c * audiodevinfo.cc: Avoid conflict with enum names. diff -r e75df9e43e63 -r 0d3e67f27d57 libinterp/dldfcn/audiodevinfo.cc --- a/libinterp/dldfcn/audiodevinfo.cc Fri Jan 09 15:03:01 2015 -0500 +++ b/libinterp/dldfcn/audiodevinfo.cc Fri Jan 09 15:46:48 2015 -0500 @@ -435,7 +435,7 @@ #ifdef HAVE_PORTAUDIO -enum audio_type { INT8, UINT8, INT16, DOUBLE }; +enum audio_type { TYPE_INT8, TYPE_UINT8, TYPE_UINT16, TYPE_DOUBLE }; class audioplayer : public octave_base_value { @@ -656,7 +656,7 @@ const double *pl = sound_l.data (); const double *pr = sound_l.data (); - if (player->get_type () == DOUBLE) + if (player->get_type () == TYPE_DOUBLE) { switch (player->get_nbits ()) { @@ -751,7 +751,7 @@ break; } } - else if (player->get_type () == INT8) + else if (player->get_type () == TYPE_INT8) { int8_t *buffer = static_cast (output); @@ -770,7 +770,7 @@ player->set_sample_number (sample_number + 1); } } - else if (player->get_type () == UINT8) + else if (player->get_type () == TYPE_UINT8) { uint8_t *buffer = static_cast (output); @@ -789,7 +789,7 @@ player->set_sample_number (sample_number + 1); } } - else if (player->get_type () == INT16) + else if (player->get_type () == TYPE_UINT16) { int16_t *buffer = static_cast (output); @@ -888,13 +888,13 @@ output_parameters.device = device; output_parameters.channelCount = 2; - if (type == DOUBLE) + if (type == TYPE_DOUBLE) output_parameters.sampleFormat = bits_to_format (get_nbits ()); - else if (type == INT8) + else if (type == TYPE_INT8) output_parameters.sampleFormat = paInt8; - else if (type == UINT8) + else if (type == TYPE_UINT8) output_parameters.sampleFormat = paUInt8; - else if (type == INT16) + else if (type == TYPE_UINT16) output_parameters.sampleFormat = paInt16; output_parameters.suggestedLatency = Pa_GetDeviceInfo (device)->defaultHighOutputLatency; @@ -905,13 +905,13 @@ audioplayer::set_y (const octave_value& y_arg) { if (y_arg.is_int8_type ()) - type = INT8; + type = TYPE_INT8; else if (y_arg.is_uint8_type ()) - type = UINT8; + type = TYPE_UINT8; else if (y_arg.is_int16_type ()) - type = INT16; + type = TYPE_UINT16; else - type = DOUBLE; + type = TYPE_DOUBLE; y = y_arg.matrix_value ();