stdcpp-audio/libstdaudio

Build errors on linux

Opened this issue · 0 comments

Tested with both GCC 8 and Clang 8

Scanning dependencies of target print_devices
[  7%] Building CXX object CMakeFiles/print_devices.dir/examples/print_devices.cpp.o
/home/kdab/src/libstdaudio/examples/print_devices.cpp:12:28: error: 
      no member named 'name' in
      'std::experimental::audio_basic_device<std::experimental::audio_null_driver_t>'
  std::cout << "- \"" << d.name() << "\", ";
                         ~ ^
/home/kdab/src/libstdaudio/examples/print_devices.cpp:13:38: error: 
      no member named 'get_sample_rate' in
      'std::experimental::audio_basic_device<std::experimental::audio_null_driver_t>'
  std::cout << "sample rate = " << d.get_sampl...
                                   ~ ^
/home/kdab/src/libstdaudio/examples/print_devices.cpp:14:38: error: 
      no member named 'get_buffer_size_frames' in
      'std::experimental::audio_basic_device<std::experimental::audio_null_driver_t>'
  std::cout << "buffer size = " << d.get_buffe...
                                   ~ ^
/home/kdab/src/libstdaudio/examples/print_devices.cpp:15:19: error: 
      no member named 'is_input' in
      'std::experimental::audio_basic_device<std::experimental::audio_null_driver_t>'
  std::cout << (d.is_input() ? d.get_num_inp...
                ~ ^
/home/kdab/src/libstdaudio/examples/print_devices.cpp:15:34: error: 
      no member named 'get_num_input_channels' in
      'std::experimental::audio_basic_device<std::experimental::audio_null_driver_t>'
  std::cout << (d.is_input() ? d.get_num_inp...
                               ~ ^
/home/kdab/src/libstdaudio/examples/print_devices.cpp:15:63: error: 
      no member named 'get_num_output_channels' in
      'std::experimental::audio_basic_device<std::experimental::audio_null_driver_t>'
  ...? d.get_num_input_channels() : d.get_num_out...
                                    ~ ^
/home/kdab/src/libstdaudio/examples/print_devices.cpp:19:19: error: 
      'this' argument to member function 'begin' has
      type 'const
      std::experimental::audio_basic_device_list<std::experimental::audio_null_driver_t>',
      but function is not marked const
  for (auto& item : list) {
                  ^
/home/kdab/src/libstdaudio/include/audio_backend/__null_backend.h:30:8: note: 
      'begin' declared here
  auto begin() -> iterator { return {}; }
       ^
/home/kdab/src/libstdaudio/examples/print_devices.cpp:19:19: note: 
      when looking up 'begin' function for range
      expression of type 'const
      std::experimental::audio_basic_device_list<std::experimental::audio_null_driver_t>'
  for (auto& item : list) {
                  ^