problem with wios

HARK FORUM problem with wios

Tagged: 

Viewing 15 posts - 1 through 15 (of 17 total)
  • Author
    Posts
  • #899
    paul
    Participant

      Whenever I try to play or record something with wios it gives me the error message
      “*** stack smashing detected ***: <unknown> terminated
      Aborted (core dumped)”
      I tried different options with the wios-command, tried wios on Ubuntu 18.04 and 16.04 and on two different computers. Same result. What could be the problem?

      PS: In the screenshot you also have a list of the hardware devices I use for playback and recording

      #915
      Rohan sheelvant
      Participant

        Yes, I am also facing the same error. I tried but was unsuccessful to figure out the problem.

        my command : wios -r -x 0 -d plughw:1,0 -c 6 -f 48000 -t 6 -o test.wav

        Please do let me know on this post if you find a solution.

        There is an alternative to wios. You can use Audacity software to record the multichannel audio data.

        #931

        Thank you for your inquiry.

        wios uses ALSA directly.

        First, make sure you can record and playback using arecord or aplay . If you set the number of bits or encoding that the hardware does not support, it may not work properly. In other words, be aware of the default settings that is used by wios.
        Secondly, wios implements only some of the features of ALSA, so some devices may not be supported. For example, when recording 24-bit PCM with the --encoding 24 option, S24_LE is supported but S24_3LE is not.

        I created a tool that I attached in this post, which can be used do a quick check. But since it has not been tested thoroughly, there may be some problems remaining. But if it works well, the output result may be helpful.

        How to compile:
        g++ wios-check.cpp -lasound -o wios-check

        How to use:
        ./wios-check <device> <type>
        <type> is one of playback , capture or both.
        defaults: <device> is hw:0,0 selected, and <type> is both selected.
        e.g.) ./wios-check plughw:0,0 playback

        Finally, HARKTOOL5 offers a new way to create transfer functions from TSP recordings that have not been synchronized. The information is written below, so I hope you find it useful.

        [HARKTOOL5-GUI documentation] => [Transfer Function Estimation Using Complex Regression Model]

        Best regards,

        #935
        paul
        Participant

          @Masayuki Takigahira: Thank you for your detailed reply and writing an extra tool. I would love to try out the tool because arecord and aplay work just fine and I still dont understand why wios is not working. I dont see any attachments to your post though 🙁

          @Rohan: I wrote a very simple bash-script which records an plays almost simultaneously using arecord and aplay (see end of post). Maybe measure the unavoidable latency between both arecord and aplay commands in a practical experiment were you put speaker and microphone right next to each other. With that information you can maybe later edit the tsp responces accordingly. I will put it to a test soon if I cant get wios working.

          !/bin/sh
          echo “Starting…” 1>&2
          arecord -d 2 -D plughw:1,0 -f S32_LE -r 48000 roomname_distance_d$1.wav &
          aplay tsp.wav

          #940
          Rohan sheelvant
          Participant

            Ok, thank you for the information

            #941
            Rohan sheelvant
            Participant

              @paul do let me know if you manage to get wios working.

              #942

              @paul: The upload failed due to a problem with the file permission. Thank you for contacting me.

              ———-
              For those who visited later …

              This post was corrected on 27th June 2019.
              Since an error was found in the attached file, uploading is done again.
              Please download wios-check2.zip.

              #945
              Rohan sheelvant
              Participant

                @Masayuki Takigahira: I checked arecord and aplay are working with my device.

                Also, I am sure that the default settings of wios are correct as the same recording device works fine using the wios command in another computer I am operating.

                Can you let me know what is the error?

                #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) + ” )”);

                  #947

                  It seems that you need to add -std=c++11 as a compile-time option in environments other than Ubuntu 18.04 or later. This is because the source code was written based on the C++11 specification.

                  #948
                  paul
                  Participant

                    @Masayuki Takigahira: Thank you. The script compiled successfully. Unfortunately, it did not give me any new information on how to overcome my problem with wios (see results of my wios_check in attachments). I hope I can do without wios.

                    Paul

                    #950

                    > Unfortunately, it did not give me any new information on how to overcome my problem with wios (see results of my wios_check in attachments).


                    @paul
                    : No. I saw your results and understood at least one of the causes.

                    
                    You can use following channels argument with the wios command.
                        -c <channels> (same as --channels <channels>)
                        *) Please select one of ( 2 ) as <channels>.
                    

                    This means that your device only supports 2 channels. If your device supports 1 or 2 channels, you will see the following message:

                    
                    You can use following channels argument with the wios command.
                        -c <channels> (same as --channels <channels>)
                        *) Please select one of ( 1-2 ) as <channels>.
                    

                    Also, while wios defaults to 16 kHz for the sampling rate, your device does not support 16 kHz. Your device supports only the sampling rates below. In other words, 44.1 kHz, 48 kHz, etc. should be selected.

                    your playback device:

                    
                    You can use following sampling rate argument with the wios command.
                        -f <rate> (same as --frequency <rate>)
                        *) Please select one of ( 44100 48000 96000 192000 ) as <rate>.
                    

                    your capture device:

                    
                    You can use following sampling rate argument with the wios command.
                        -f <rate> (same as --frequency <rate>)
                        *) Please select one of ( 44100 48000 96000 ) as <rate>.
                    

                    ——
                    You will need to do some things:
                    – The tsp1.wav that you used is 1 Channel (Mono) data, but you need to make it 2 Chennels (Stereo).
                    e.g.) If you use a tool called sox , the following will duplicate the channel after rate conversion:
                    sox tsp1.wav -r 48000 tsp2.wav remix 1 1
                    Instead, please try using the output tsp2.wav.
                    – Please set the channel number explicitly as -c 2 on your device. It is not -c 1 .
                    – Please set the sampling rate explicitly as (e.g.) -f 48000 on your device. It is not -f 16000 (This is the wios default if not set).

                    ——
                    The following commands should work on your device.
                    arecord -d 16 -D plughw:0,0 -f S32_LE -c 2 -r 48000 output.wav
                    To make it work the same way:
                    wios -r -x 0 -t 16 -a plughw:0,0 -e 32 -c 2 -f 48000 -o output.wav

                    The following commands should work on your device.
                    aplay -D plughw:0,0 tsp.wav
                    To make it work the same way:
                    wios -p -x 0 -d plughw:0,0 -i tsp.wav
                    *) tsp.wav must be 48 kHz, 32-bit (or 16-bit) 2-channel data.

                    The settings for syncing your recording and playback devices in this example are:
                    wios -s -x 0 -y plughw:0,0 -z plughw:0,0 -e 32 -c 2 -f 48000 -i tsp.wav -o output.wav
                    wios -s -y 0 -d plughw:0,0 -z 0 -a plughw:0,0 -e 32 -c 2 -f 48000 -i tsp.wav -o output.wav

                    Notes:
                    If you get an error message about buffers (for example, buffer overruns), you can work around by setting the buffer size larger than the initial value using the -N and -Z options.

                    I hope this answer will help you solve your problem.

                    Best regards,

                    #951
                    paul
                    Participant

                      @Masayuki Takigahira: I understood the wios_check_results and already tried -c 2 and -f 48000 together. What I did not think of was making the tsp a 48kHz stereo sound before playback with wios. Sadly, the results are the same (see attachment).

                      #975

                      Thank you for reporting this error.
                      And, I appreciate your help confirming the operation of the debug version.

                      It has been confirmed that this error is caused by compiler optimization. Currently, we are preparing a package for publishing with a reduced optimization level as a workaround. It will be released in the next few days.

                      The version with the bug fixed will be “WIOS 3.0.7.1”. Please wait for it to be posted on “News” page.

                      Best regards,

                      #999
                      paul
                      Participant

                        Im glad I could help. However I experienced a new problem with the debug version when using synchronous mode and an external recorder (plughw:1,0):

                        wios -s -x 0 -z plughw:1,0 -i input.wav -o output.wav (=>Fail)

                        If I enter the command above it only shows me the wios help page. As if I typed “wios -h”. It feels like it doesnt even know the option “-z”. Synchronous mode only works when leaving out “-z plughw:1,0” and therefore using the default setting. Although if I explicitly type in “-z plughw:0,0” it again shows me the help page ¯\_(ツ)_/¯

                        “plughw:1,0” works fine in recording mode:
                        wios -r -x 0 -t 4 -o output.wav -a plughw:1,0 -c 8 (=>Success)

                        • This reply was modified 5 years, 5 months ago by paul.
                      Viewing 15 posts - 1 through 15 (of 17 total)
                      • You must be logged in to reply to this topic.