Reply To: problem with wios

HARK FORUM problem with wios Reply To: problem with wios

#946
Rohan sheelvant
Participant

    Also, I tried to run the command: g++ wios-check.cpp -lasound -o wios-check

    but I got the following error :
    g++ wios-check.cpp -lasound -o wios-check
    wios-check.cpp:23:3: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11
    };
    ^
    wios-check.cpp:30:3: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11
    };
    ^
    wios-check.cpp:23:3: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11
    };
    ^
    wios-check.cpp:23:3: error: converting to ‘std::vector<_snd_pcm_access>’ from initializer list would use explicit constructor ‘std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>::size_type, const value_type&, const allocator_type&) [with _Tp = _snd_pcm_access; _Alloc = std::allocator<_snd_pcm_access>; std::vector<_Tp, _Alloc>::size_type = long unsigned int; std::vector<_Tp, _Alloc>::value_type = _snd_pcm_access; std::vector<_Tp, _Alloc>::allocator_type = std::allocator<_snd_pcm_access>]’
    wios-check.cpp:30:3: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11
    };
    ^
    wios-check.cpp:30:3: error: could not convert ‘{SND_PCM_FORMAT_U8, SND_PCM_FORMAT_S16_LE, SND_PCM_FORMAT_S24_LE, SND_PCM_FORMAT_S32_LE}’ from ‘<brace-enclosed initializer list>’ to ‘std::vector<_snd_pcm_format>’
    wios-check.cpp:129:3: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11
    };
    ^
    wios-check.cpp:179:3: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11
    };
    ^
    wios-check.cpp:195:3: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11
    };
    ^
    wios-check.cpp:129:3: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11
    };
    ^
    wios-check.cpp:129:3: error: could not convert ‘{SND_PCM_ACCESS_MMAP_INTERLEAVED, SND_PCM_ACCESS_MMAP_NONINTERLEAVED, SND_PCM_ACCESS_MMAP_COMPLEX, SND_PCM_ACCESS_RW_INTERLEAVED, SND_PCM_ACCESS_RW_NONINTERLEAVED}’ from ‘<brace-enclosed initializer list>’ to ‘std::vector<_snd_pcm_access>’
    wios-check.cpp:179:3: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11
    };
    ^
    wios-check.cpp:179:3: error: could not convert ‘{SND_PCM_FORMAT_S8, SND_PCM_FORMAT_U8, SND_PCM_FORMAT_S16_LE, SND_PCM_FORMAT_S16_BE, SND_PCM_FORMAT_U16_LE, SND_PCM_FORMAT_U16_BE, SND_PCM_FORMAT_S24_LE, SND_PCM_FORMAT_S24_BE, SND_PCM_FORMAT_U24_LE, SND_PCM_FORMAT_U24_BE, SND_PCM_FORMAT_S32_LE, SND_PCM_FORMAT_S32_BE, SND_PCM_FORMAT_U32_LE, SND_PCM_FORMAT_U32_BE, SND_PCM_FORMAT_FLOAT_LE, SND_PCM_FORMAT_FLOAT_BE, SND_PCM_FORMAT_FLOAT64_LE, SND_PCM_FORMAT_FLOAT64_BE, SND_PCM_FORMAT_IEC958_SUBFRAME_LE, SND_PCM_FORMAT_IEC958_SUBFRAME_BE, SND_PCM_FORMAT_MU_LAW, SND_PCM_FORMAT_A_LAW, SND_PCM_FORMAT_IMA_ADPCM, SND_PCM_FORMAT_MPEG, SND_PCM_FORMAT_GSM, SND_PCM_FORMAT_SPECIAL, SND_PCM_FORMAT_S24_3LE, SND_PCM_FORMAT_S24_3BE, SND_PCM_FORMAT_U24_3LE, SND_PCM_FORMAT_U24_3BE, SND_PCM_FORMAT_S20_3LE, SND_PCM_FORMAT_S20_3BE, SND_PCM_FORMAT_U20_3LE, SND_PCM_FORMAT_U20_3BE, SND_PCM_FORMAT_S18_3LE, SND_PCM_FORMAT_S18_3BE, SND_PCM_FORMAT_U18_3LE, SND_PCM_FORMAT_U18_3BE, SND_PCM_FORMAT_G723_24, SND_PCM_FORMAT_G723_24_1B, SND_PCM_FORMAT_G723_40, SND_PCM_FORMAT_G723_40_1B, SND_PCM_FORMAT_DSD_U8, SND_PCM_FORMAT_DSD_U16_LE, SND_PCM_FORMAT_DSD_U32_LE, SND_PCM_FORMAT_DSD_U16_BE, SND_PCM_FORMAT_DSD_U32_BE}’ from ‘<brace-enclosed initializer list>’ to ‘std::vector<_snd_pcm_format>’
    wios-check.cpp:195:3: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11
    };
    ^
    wios-check.cpp:195:3: error: could not convert ‘{5512, 8000, 11025, 16000, 22050, 32000, 44100, 48000, 64000, 88200, 96000, 176400, 192000}’ from ‘<brace-enclosed initializer list>’ to ‘std::vector<unsigned int>’
    wios-check.cpp: In constructor ‘AudioDevice::AudioDevice()’:
    wios-check.cpp:205:32: error: ‘nullptr’ was not declared in this scope
    AudioDevice(): name(“”), pcm(nullptr), hw_params(nullptr){
    ^
    wios-check.cpp: In destructor ‘AudioDevice::~AudioDevice()’:
    wios-check.cpp:208:15: error: ‘nullptr’ was not declared in this scope
    if(pcm != nullptr){
    ^
    wios-check.cpp:212:21: error: ‘nullptr’ was not declared in this scope
    if(hw_params != nullptr){
    ^
    wios-check.cpp: In member function ‘bool AudioDevice::is_valid()’:
    wios-check.cpp:219:15: error: ‘nullptr’ was not declared in this scope
    if(pcm == nullptr){ return false; }
    ^
    wios-check.cpp:221:21: error: ‘nullptr’ was not declared in this scope
    if(hw_params == nullptr){ return false; }
    ^
    wios-check.cpp: In member function ‘bool AudioDevice::open_device(std::__cxx11::string&, std::__cxx11::string&, std::__cxx11::string&, bool)’:
    wios-check.cpp:239:15: error: ‘nullptr’ was not declared in this scope
    if(pcm != nullptr){
    ^
    wios-check.cpp:263:13: error: ‘nullptr’ was not declared in this scope
    pcm = nullptr;
    ^
    wios-check.cpp:272:13: error: ‘nullptr’ was not declared in this scope
    pcm = nullptr;
    ^
    wios-check.cpp:281:13: error: ‘nullptr’ was not declared in this scope
    pcm = nullptr;
    ^
    wios-check.cpp: In member function ‘bool AudioDevice::print_support_channels()’:
    wios-check.cpp:353:28: error: ‘to_string’ is not a member of ‘std’
    std::string s(“( ” + std::to_string(min) + ” )”);
    ^
    wios-check.cpp: In member function ‘bool AudioDevice::print_support_rates()’:
    wios-check.cpp:406:28: error: ‘to_string’ is not a member of ‘std’
    std::string s(“( ” + std::to_string(min) + ” )”);
    ^
    wios-check.cpp:411:28: error: ‘to_string’ is not a member of ‘std’
    std::string s(“( ” + std::to_string(min) + “-” + std::to_string(max) + ” )”);
    ^
    wios-check.cpp:411:56: error: ‘to_string’ is not a member of ‘std’
    std::string s(“( ” + std::to_string(min) + “-” + std::to_string(max) + ” )”);