It is currently September 21st, 2020, 1:19 pm

[Feature Suggestion] Audio multi-threading and controls

Report bugs with the Rainmeter application and suggest features.
User avatar
deflore08
Posts: 38
Joined: July 12th, 2020, 7:47 am

[Feature Suggestion] Audio multi-threading and controls

Post by deflore08 »

Hello!

I am working on a skin with sound design now. The way that Rainmeter works with audio is a bit simple and hard limited.
It would be great if it is possible to teach Rainmeter to work with multi audio threads.

For example: mouse over on element begins to play a short audio file. It works good, when it's only 1 element. But what if there 2 or 3 close to themselves? Now one-threading mechanic causes to stop the current audio in the thread and play a new. So it makes more or less acceptable sound design impossible.

What mechanic i'd expect in this situation? Mouse over on element begins to play a sound, then, while sound playing and mouse overs on other element, it starts a new thread with a new audio file. Option to FADE (instead of STOP) first thread is needed in this case. I think it would open a great opportunity to make interactive skins with sound designs and new experience. But of course, i could be wrong. :)
User avatar
Yincognito
Posts: 2565
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: [Feature Suggestion] Audio multi-threading and controls

Post by Yincognito »

deflore08 wrote: August 3rd, 2020, 11:13 pm Hello!

I am working on a skin with sound design now. The way that Rainmeter works with audio is a bit simple and hard limited.
It would be great if it is possible to teach Rainmeter to work with multi audio threads.

For example: mouse over on element begins to play a short audio file. It works good, when it's only 1 element. But what if there 2 or 3 close to themselves? Now one-threading mechanic causes to stop the current audio in the thread and play a new. So it makes more or less acceptable sound design impossible.

What mechanic i'd expect in this situation? Mouse over on element begins to play a sound, then, while sound playing and mouse overs on other element, it starts a new thread with a new audio file. Option to FADE (instead of STOP) first thread is needed in this case. I think it would open a great opportunity to make interactive skins with sound designs and new experience. But of course, i could be wrong. :)
I don't think it's that simple, as seen here. Rainmeter probably relies on Windows API calls to do this, so it's not its fault. I think the best option is to find an application that can do that and can run things from the command line, then execute it through the RunCommand plugin. I'm not sure if it can do this, but you may take a look at the mediaplay command for NirCmd (bottom of the page), maybe you're lucky and it works. Another option would be to try to play things from the browser (in multiple tabs?) but I don't know how this can be integrated with Rainmeter to hide the visual part.

Generally software that can place sounds on multiple "tracks" and edit them (media editors, mostly) should be able to achieve this. Now if such a program can run things from the command line, you're good to go. Other than that, even Winamp stops the currently played file before playing another, so...
User avatar
deflore08
Posts: 38
Joined: July 12th, 2020, 7:47 am

Re: [Feature Suggestion] Audio multi-threading and controls

Post by deflore08 »

Hey Yin! Yep, WINAPI allow only one thread and it's a problem, not a bug. :)

I saw 3rd-party LUA library for multi thread sound, but there is no choice to use that with rainmeter now. Well.. Got to look your suggestions now. :)
User avatar
Yincognito
Posts: 2565
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: [Feature Suggestion] Audio multi-threading and controls

Post by Yincognito »

deflore08 wrote: August 4th, 2020, 10:41 am Hey Yin! Yep, WINAPI allow only one thread and it's a problem, not a bug. :)

I saw 3rd-party LUA library for multi thread sound, but there is no choice to use that with rainmeter now. Well.. Got to look your suggestions now. :)
Good luck with your quest - let folks know if you found an acceptable solution, maybe it helps someone else later on. ;-)