flat assembler
Message board for the users of flat assembler.

Index > Windows > WASAPI or APO for Delay effect

Author
Thread Post new topic Reply to topic
Overclick



Joined: 11 Jul 2020
Posts: 445
Location: Ukraine
Overclick
Hi
I need help to add Delay effect for exist audio stream on default output device.
I know how to capture sound from rendered stream but I need to mute it somehow to render it back with required delay. Seems it's impossible via WASAPI, am I right?
Then I need some simplest way to patch APO for default device and use it somehow. Too difficult for me... Can someone help?

I using "Equalizer APO" project as engine for my own. I tried to read source of it, but it's too large and complicated Confused
My project:
https://sourceforge.net/projects/stereo-to-7-1-converter/
Post 31 Oct 2020, 23:45
View user's profile Send private message Visit poster's website Reply with quote
Overclick



Joined: 11 Jul 2020
Posts: 445
Location: Ukraine
Overclick
Is it too difficult for assembler community? Sad
Post 05 Nov 2020, 16:40
View user's profile Send private message Visit poster's website Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 3387
Location: vpcmipstrm
bitRAKE
I'm sorry, but I am completely ignorant of audio. The little time I invested discovered "loop-back" mode - which they state was designed specifically for noise-cancellation. So, it seems it must be possible, but with some limitations.

Am I totally off base?

I did learn it is much more complex than I would have imagined. Wish I had more time - I might look at other software like audio delay plugins for VLC, or how VLC itself syncs audio.

_________________
¯\(°_o)/¯ unlicense.org
Post 06 Nov 2020, 01:13
View user's profile Send private message Visit poster's website Reply with quote
Overclick



Joined: 11 Jul 2020
Posts: 445
Location: Ukraine
Overclick
Loop-back is a way to get played sound. I cannot do much with it. Even if I radically drop the volume instead of mute, all of this operations would be projected to my own stream session. Windows lets to control partially but own session only. If I settle all sound -100dB and own stream +100dB it would be overloaded any way. The only way for WASAPI I see is return my own stream by different subsystem like ASIO but it is very bad solution any way. VST plugins works for own session only I think.
Post 06 Nov 2020, 02:09
View user's profile Send private message Visit poster's website Reply with quote
Furs



Joined: 04 Mar 2016
Posts: 1770
Furs
If you want to make it system-wide you'll probably need to write a driver. I don't know anything about Windows drivers or subsystems, just the APIs.

I know there are companies that make system-wide callibration software and they all require you to install a driver. They also have plugin versions of course, and those don't, but those can only be used in an application supporting that plugin interface (e.g. VST).
Post 06 Nov 2020, 13:13
View user's profile Send private message Reply with quote
Overclick



Joined: 11 Jul 2020
Posts: 445
Location: Ukraine
Overclick
Seems SndVol.exe controls different sessions, I should try to investigate that mechanics...
Post 07 Nov 2020, 02:54
View user's profile Send private message Visit poster's website Reply with quote
donn



Joined: 05 Mar 2010
Posts: 227
donn
Possibly with an Exclusive Mode stream?

https://docs.microsoft.com/en-us/windows/win32/coreaudio/exclusive-mode-streams?redirectedfrom=MSDN

I'm sure you have this link, but then it's a matter of leveraging WASAPI

https://docs.microsoft.com/en-us/windows/win32/coreaudio/volume-controls

Also, assuming your existing audio stream is from another app, not being recorded i.e. from a mic right?
https://stackoverflow.com/questions/12922930/c-how-can-i-capture-sound-from-the-microphone

Last time I worked with WASAPI was just on computing Karplus Strong, will revisit this soon. What you're trying to achieve may not be too straightforward, as the link below suggests. They also provided the Exclusive Mode suggestion:
https://stackoverflow.com/questions/6007716/mute-other-applications-sound-when-my-application-is-playing-a-sound
Post 07 Nov 2020, 18:40
View user's profile Send private message Reply with quote
Overclick



Joined: 11 Jul 2020
Posts: 445
Location: Ukraine
Overclick
No, I'm looking for a loopback mode, not mic. I cannot do anything globally as loopback is my source. My own stream going through that rules too.
I need to mute (almost mute) volume in all processes sessions exept own one.
sndvol.exe "Default windows Mixer" can control all sessions.
Step by step:
1) Start own stream
2) Get info about running sessions
3) Drop their volume to almost zero (exept own)
4) Copy audio buffers of each session to workplace (exept own)
5) Add audio effects, correct back level of volume
6) Return the sound by own stream

Windows provides some volume control of audio sessions but not sure I can loopback them separatelly. Maybe that is problem too.

Also Exclusive Mode disconnects everything else then I'll lose my source.
Post 07 Nov 2020, 19:12
View user's profile Send private message Visit poster's website Reply with quote
DimonSoft



Joined: 03 Mar 2010
Posts: 1011
Location: Belarus
DimonSoft
Overclick wrote:
I need to mute (almost mute) volume in all processes sessions exept own one.

<OffTop>I hope I’ll never meet such program. What if two programs (or two instances of the same program) want to do that?</OffTop>
Post 07 Nov 2020, 21:10
View user's profile Send private message Visit poster's website Reply with quote
Overclick



Joined: 11 Jul 2020
Posts: 445
Location: Ukraine
Overclick
DimonSoft wrote:
Overclick wrote:
I need to mute (almost mute) volume in all processes sessions exept own one.

<OffTop>I hope I’ll never meet such program. What if two programs (or two instances of the same program) want to do that?</OffTop>

Want to do what? Run the same kind of audio effect twice? I hope I'll never meet such kind of users like you that f.. my brain before see anything finalized.
1) My prog is checking for quantity of instances.
2) Sessions can be choosen.
3) Levels can be virtualized.
4) Sessions can be regrouped and emulated.
5) Some of progs use own virtual driver or APO patch. There is more chance to meet the same doing progs.
p.s. По делу есть что сказать или снова режим троллинга включил?
Post 07 Nov 2020, 21:49
View user's profile Send private message Visit poster's website Reply with quote
DimonSoft



Joined: 03 Mar 2010
Posts: 1011
Location: Belarus
DimonSoft
Answering the question “What if two programs did this?” is an important step in evaluation of a feature or design request. If you’re not willing to be notified of possible problems, you’d better state it before asking questions.

As for the Russian part of your message and trying to call me a troll, I’d say this message is a better example of trolling:
Overclick wrote:
Is it too difficult for assembler community? Sad

Did you ever notice other people who ask for help here get it much faster? Life is hard if everyone around you is an enemy.
Post 08 Nov 2020, 10:23
View user's profile Send private message Visit poster's website Reply with quote
Overclick



Joined: 11 Jul 2020
Posts: 445
Location: Ukraine
Overclick
Quote:

Life is hard if everyone around you is an enemy.

Will you tell me that? It's funny, considering how you assert yourself in empty conversations off topic, not just in my threads. I'm part of this community too and it is difficult for me. Sorry to let your big person read that horrible question. Just ignore me please.
Post 08 Nov 2020, 11:08
View user's profile Send private message Visit poster's website Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 3387
Location: vpcmipstrm
bitRAKE
Sorry, for being off topic.
DimonSoft wrote:
Did you ever notice other people who ask for help here get it much faster?
My own perspective is that time is more complex than you imagine it to be, and you choose to personalize it for your own perspective. Only the type of question being asked and community activity effects the response time - not the asker of the question.

_________________
¯\(°_o)/¯ unlicense.org
Post 08 Nov 2020, 14:14
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.