Questions tagged [asio]

ASIO stands for Audio Stream Input/Output, a digital audio protocol. For questions about the Boost.Asio C++ library for asynchronous I/O, use the [boost-asio] tag to avoid ambiguity.

Audio Stream Input/Output is a low-latency protocol for sending and receiving audio data from sound interfaces. It was developed by Steinberg, which offers a licensed ASIO SDK among other audio software technology such as VST plugins.


Please note that in order to avoid ambiguity, questions about Boost.Asio should be tagged with as discussed on meta.

479 questions
2
votes
1 answer

When does Asio's timer throws while canceling?

Boost Asio's steady_timer::cancel() may throw a boost::system::system_error. Under what circumstances can this happen? https://www.boost.org/doc/libs/1_67_0/doc/html/boost_asio/reference/basic_waitable_timer/cancel/overload1.html The current…
Benjamin Buch
  • 4,752
  • 7
  • 28
  • 51
2
votes
2 answers

European characters switch to strange characters in response when posting to server using C++

I am struggeling to get the response from the server in correct format under Windows. I have tried two C++ libraries Beast, (based on Boost Asio) and Cpr (based on libcurl) and I get the exact same issue with both. The strange thing is that I also…
user3259898
  • 85
  • 1
  • 1
  • 8
2
votes
1 answer

asio aync_send memory leak

I have next snippet: void TcpConnection::Send(const std::vector& buffer) { std::shared_ptr> bufferCopy = std::make_shared>(buffer); auto socket =…
2
votes
1 answer

Boost.Asio: The I/O operation has been aborted because of either a thread exit or an application request

I am learning Boost.Asio. I created a simple program to resolve a host name to IP address. It works fine when using the synchronous resolve operation. However, when I try the asynchronous way, there is some strange behavior. #include…
kebugcheck
  • 153
  • 2
  • 11
2
votes
1 answer

ASIO UDP: class std::allocator has no member named ‘construct’

I have followed this example to set up an asynchronous UDP receive. But it fails on compilation: g++ -Wall -Wconversion -Wfatal-errors -Wextra -std=c++11 test1.cpp Error message: In file included from /usr/include/c++/5/ext/alloc_traits.h:36:0, …
ar2015
  • 5,558
  • 8
  • 53
  • 110
2
votes
1 answer

How to combine strand wrapper and priority wrapper on Boost Asio

I'd like to use Boost.Asio's strand and prioritized wrapper in the same time. Before I write my code, I've read the following information: Boost asio priority and strand boost::asio and Active…
Takatoshi Kondo
  • 3,111
  • 17
  • 36
2
votes
1 answer

boost:asio::read or boost:asio::async_read with timeout

Yes. I know there have been a few questions around this time_out in boost::asio. My problem might to too simple for the asio guys to solve here. I am using boost::asio on TCP protocol to read data over a network continuously in a loop as fast as I…
TheWaterProgrammer
  • 7,055
  • 12
  • 70
  • 159
2
votes
2 answers

Using ASIO to capture lots of UDP packets

I'm using the asio ( non boost version) library to capture incoming UDP packets via a 10GB Ethernet adapter. 150k packets a second is fine, but I start getting dropped packets when i got to higher rates like 300k packets/sec. I'm pretty sure the…
James
  • 67
  • 7
2
votes
1 answer

Boost time stamping UDP packets

I would like to retrieve the reception timestamp for UDP packets received using boost asio. I found out that the kernel provides the socket option SO_TIMESTAMP which should allow the generation of a timestamp when the packets is received by the…
Maverik
  • 2,358
  • 6
  • 34
  • 44
2
votes
1 answer

NAudio: "Unable to instantiate ASIO. Check if STAThread is set"

I'm attempting to route microphone audio into the speakers in NAudio, using ASIO drivers. I have been successful in the NAudio demo project. Copying this code over to a different project (XNA, if relevant) is causing a COMException every time. …
SFX
  • 169
  • 11
2
votes
1 answer

ASIO SDK how to process audio buffers

So I am working on some audio processing software and I'm kinda confused on some of the ASIO audio processing. From what I'm reading, It seems like when the buffer switch callback is made, I need to process the "input" into the "output". But what if…
Caleb Merchant
  • 289
  • 1
  • 5
  • 16
2
votes
1 answer

How to record and playback with NAudio using AsioOut

I'm trying to get the sound input and send output directly with less latency possible with C#. I'm using the library NAudio that supports ASIO for better latency. In particular, I use the AsioOut object for recording and another for playback…
Shafa95
  • 201
  • 2
  • 14
2
votes
1 answer

Writing multiple wav files from NAudio asioOut

I'm trying to record 3-4 streams of audio and write them to separate wav files. I'm using NAudio's asioOut to capture the audio. At first I was just writing a 3 or 4 channel wav file. So I searched questions here and thought I founded an answer,…
Dylan B
  • 23
  • 2
1
vote
2 answers

PortAudio shows a device count of zero for both Asio and WDM-KS

PortAudio is showing a deviceCount of 0 and a defaultOutputDevice of -1 for both the ASIO and Windows WDM-KS host APIs. I did successfully build PortAudio to include support for both ASIO and Windows WDM-KS and both options do show up when iterating…
herbrandson
  • 2,357
  • 2
  • 30
  • 44
1
vote
1 answer

Undefined reference to `g_Templates'

I am trying to compile ASIO with MinGW for my application, but I keep running into undefined reference to 'g_Templates', 'g_cTemplates', and 'vtable for AsioDriver'. I am linking with -lole32 -luuid. What additional libraries do I need to compile…
Jakub Zaverka
  • 8,816
  • 3
  • 32
  • 48