INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Is there an analogous MC WMD sound redirect feature from other apps ?  (Read 1890 times)

ths61

  • World Citizen
  • ***
  • Posts: 162

Does the Linux port have an analogous MC WMD sound redirect feature from other Linux apps (e.g. play Spotify through the Linux MC distro) ?

Is there a list of functional and non-functional Linux audio features (e.g. volume protection, master volume, etc.) ?

Thanks much.
Logged
Main - JRMC31 -> custom ALSA_cdsp -> CamillaDSP(2x8 channel 64-bit FIR convolution) -> 8 channel DAC
Office - JRMC31 -> Asus Xonar Essence STX -> W4S STI-1000 -> Mini-Magnepans
Shop - JRMC31 -> W4S MicroDAC -> Adcom GFA-2535 -> B&W Rock Solid

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72438
  • Where did I put my teeth?
Re: Is there an analogous MC WMD sound redirect feature from other apps ?
« Reply #1 on: January 19, 2021, 09:40:08 pm »

Does the Linux port have an analogous MC WMD sound redirect feature from other Linux apps (e.g. play Spotify through the Linux MC distro) ?
No.
Quote

Is there a list of functional and non-functional Linux audio features (e.g. volume protection, master volume, etc.) ?

Thanks much.
It's the same as the Windows version. 
Logged

ths61

  • World Citizen
  • ***
  • Posts: 162
Re: Is there an analogous MC WMD sound redirect feature from other apps ?
« Reply #2 on: January 21, 2021, 12:52:07 am »

Does the Linux port have an analogous MC WMD sound redirect feature from other Linux apps (e.g. play Spotify through the Linux MC distro) ?
No.

Not the answer I was looking for, but thanks for the quick answer.

I would like to be able to play Spotify/Pandora/etc. through MC's convolver if any Linux workarounds or new audio features become available to bring the feature sets on par.

I tried installing v26 on 64-bit Debian 10 with a real time kernel and the new install procedure was straight forward.
Logged
Main - JRMC31 -> custom ALSA_cdsp -> CamillaDSP(2x8 channel 64-bit FIR convolution) -> 8 channel DAC
Office - JRMC31 -> Asus Xonar Essence STX -> W4S STI-1000 -> Mini-Magnepans
Shop - JRMC31 -> W4S MicroDAC -> Adcom GFA-2535 -> B&W Rock Solid

Awesome Donkey

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 7804
  • Autumn shade...
Re: Is there an analogous MC WMD sound redirect feature from other apps ?
« Reply #3 on: January 21, 2021, 03:29:58 am »

You can only do it in Windows unfortunately, since the WDM driver is a Windows-only feature (in fact WDM stands for Windows Driver Model).
Logged
I don't work for JRiver... I help keep the forums safe from "male enhancements" and other sources of sketchy pharmaceuticals.

Windows 11 24H2 Update 64-bit + Ubuntu 24.10 Oracular Oriole 64-bit | Windows 11 24H2 Update 64-bit (Intel N305 Fanless NUC 16GB RAM/500GB M.2 NVMe SSD)
JRiver Media Center 33 (Windows + Linux) | iFi ZEN DAC 3 | JBL 306P MkII Studio Monitors | Audio-Technica ATH-M50x Headphones

ths61

  • World Citizen
  • ***
  • Posts: 162
Re: Is there an analogous MC WMD sound redirect feature from other apps ?
« Reply #4 on: January 21, 2021, 08:22:59 pm »

You can only do it in Windows unfortunately, since the WDM driver is a Windows-only feature (in fact WDM stands for Windows Driver Model).

I understand what WMD means, but Unix/Linux is famous for its pipes, tees and redirections of I/O streams. One would think it would fit right at home in Linux.  =)
Logged
Main - JRMC31 -> custom ALSA_cdsp -> CamillaDSP(2x8 channel 64-bit FIR convolution) -> 8 channel DAC
Office - JRMC31 -> Asus Xonar Essence STX -> W4S STI-1000 -> Mini-Magnepans
Shop - JRMC31 -> W4S MicroDAC -> Adcom GFA-2535 -> B&W Rock Solid

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient
Re: Is there an analogous MC WMD sound redirect feature from other apps ?
« Reply #5 on: January 22, 2021, 05:29:40 pm »

I understand what WMD means, but Unix/Linux is famous for its pipes, tees and redirections of I/O streams. One would think it would fit right at home in Linux.  =)

Yeah you'd think it would be possible.  Like, it's trivial to create a dummy ALSA device on Linux that can be set as the system default and will redirect all system audio to a pipe (all it takes is editing two config files).  I got my system set up to do that for a while, and I could have all my Linux software system-wide (including MC if I wanted) output to the pipe and even redirect that pipe to a file to record local playback, but I just found no good way to get MC to take a pipe as input in real-time.  Given that MC can open and play remote audio streams like web radio, you'd think reading info from a local pipe would be theoretically possible (and may have fewer complicating factors). 

I briefly toyed with writing script to redirect my dummy alsa device pipe to a series of files(i.e. changing to a new file after some short interval) and then use MCWS to programmatically add the completed chunk files to the now playing list in real-time to get a slightly delayed WDM-like experience, but I never managed to get sub-second chunking/adding to work well at all, and the whole thing was pretty wonky. It would have been totally unusable for video or games, so I never got very far down the line.

I suspect that it may be possible one day!
Logged

ths61

  • World Citizen
  • ***
  • Posts: 162
Re: Is there an analogous MC WMD sound redirect feature from other apps ?
« Reply #6 on: January 23, 2021, 07:09:07 pm »

...

I briefly toyed with writing script to redirect my dummy alsa device pipe to a series of files(i.e. changing to a new file after some short interval) and then use MCWS to programmatically add the completed chunk files to the now playing list in real-time to get a slightly delayed WDM-like experience, but I never managed to get sub-second chunking/adding to work well at all, and the whole thing was pretty wonky. It would have been totally unusable for video or games, so I never got very far down the line.

I suspect that it may be possible one day!

Have you seen these ? 

Using modprobe to add snd-aloop to the kernel to create an ALSA loopback, then recording the ALSA stream from the loopback using ffmpeg ?  It might give some ideas.

https://unix.stackexchange.com/questions/310164/create-virtual-device-in-asoundrc-file

https://unix.stackexchange.com/questions/263813/how-do-i-create-virtual-alsa-device-from-which-i-can-record-everything-that-is-p

https://www.alsa-project.org/alsa-doc/alsa-lib/pcm_plugins.html
Logged
Main - JRMC31 -> custom ALSA_cdsp -> CamillaDSP(2x8 channel 64-bit FIR convolution) -> 8 channel DAC
Office - JRMC31 -> Asus Xonar Essence STX -> W4S STI-1000 -> Mini-Magnepans
Shop - JRMC31 -> W4S MicroDAC -> Adcom GFA-2535 -> B&W Rock Solid

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13871
Re: Is there an analogous MC WMD sound redirect feature from other apps ?
« Reply #7 on: January 29, 2021, 09:59:32 am »

Yeah you'd think it would be possible.  Like, it's trivial to create a dummy ALSA device on Linux that can be set as the system default and will redirect all system audio to a pipe (all it takes is editing two config files).  I got my system set up to do that for a while, and I could have all my Linux software system-wide (including MC if I wanted) output to the pipe and even redirect that pipe to a file to record local playback, but I just found no good way to get MC to take a pipe as input in real-time.  Given that MC can open and play remote audio streams like web radio, you'd think reading info from a local pipe would be theoretically possible (and may have fewer complicating factors). 

I briefly toyed with writing script to redirect my dummy alsa device pipe to a series of files(i.e. changing to a new file after some short interval) and then use MCWS to programmatically add the completed chunk files to the now playing list in real-time to get a slightly delayed WDM-like experience, but I never managed to get sub-second chunking/adding to work well at all, and the whole thing was pretty wonky. It would have been totally unusable for video or games, so I never got very far down the line.

I suspect that it may be possible one day!
I've though about this occasionally and thought it seems like something that should be doable. I'm just not sure how in MC to handle the input.
If you use file->open on the pipe does that work?
Where should it feed into MC?
Logged

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4226
Re: Is there an analogous MC WMD sound redirect feature from other apps ?
« Reply #8 on: January 29, 2021, 10:36:05 am »

I've though about this occasionally and thought it seems like something that should be doable. I'm just not sure how in MC to handle the input.
If you use file->open on the pipe does that work?
Where should it feed into MC?
why can't you just use some alsa input directly? isn't it going to be logically the same as asio line in?
Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient
Re: Is there an analogous MC WMD sound redirect feature from other apps ?
« Reply #9 on: January 29, 2021, 11:11:53 am »

I've though about this occasionally and thought it seems like something that should be doable. I'm just not sure how in MC to handle the input.
If you use file->open on the pipe does that work?
Where should it feed into MC?

Opening the pipe as a file did not work last time I tried it.  I think MC expects the file input to be a fixed size which obviously doesn't work with the pipe. 

I agree that listening to ALSA input directly (like the "open live" option on Windows) seems like a cleaner solution than piping it in.  Depending on how its implemented it might not even require any user configuration at the OS level (audacity, for example, seems to be able to loopback/monitor arbitrary ALSA sinks with no changes to my system configs).
Logged

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13871
Re: Is there an analogous MC WMD sound redirect feature from other apps ?
« Reply #10 on: January 29, 2021, 12:37:50 pm »

Opening the pipe as a file did not work last time I tried it.  I think MC expects the file input to be a fixed size which obviously doesn't work with the pipe. 

I agree that listening to ALSA input directly (like the "open live" option on Windows) seems like a cleaner solution than piping it in.  Depending on how its implemented it might not even require any user configuration at the OS level (audacity, for example, seems to be able to loopback/monitor arbitrary ALSA sinks with no changes to my system configs).
Do you know anything about how the format is determined?
Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient
Re: Is there an analogous MC WMD sound redirect feature from other apps ?
« Reply #11 on: January 29, 2021, 01:52:32 pm »

Do you know anything about how the format is determined?

I would expect you could query alsa or pulse in a similar way to how you find out what formats output devices support (i.e. alsacap or pactl list). 

For a pulse specific example, "pactl list" shows if a given sink is running and what output format it's currently using.  It also shows various "sources" that are monitors of the various output sinks.  For example, if I set my audacity input to "monitor of <name>" then I get whatever is being output to the sink <name>, and pactl list shows me what the current output format is for the sink I'm monitoring.  So you could probably directly parse what you need out of pactl or if you need more info maybe figure out how pactl is getting its answers?

I'm sure there are similar methods for direct monitoring in alsa using alsacap/aplay/snd-aloop, but when I got my pipe set up I mostly just piped it into aplay which seemed to automagically know what to do with it.  I don't have a clear idea of how to programmatically get the output format of a running stream directly at the ALSA layer (i.e. pulse can tell me about it, but that doesn't help where pulse isn't installed). 
Logged

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4226
Re: Is there an analogous MC WMD sound redirect feature from other apps ?
« Reply #12 on: January 29, 2021, 02:32:49 pm »

this hook might help? https://github.com/scripple/alsa_hook_hwparams

I've noticed camilladsp has support for processing being driven by a pipe so possibly you can look at that code for inspiration.

not sure if you can create a null sink (for pulse) or aloop (for alsa) on behalf of the user or whether it would be something the user has to configure. If it has to be the user then imv that's fine, seems preferable to have a working loopback that takes some manual config vs no loopback at all.
Logged

Wheaten

  • Guest
Re: Is there an analogous MC WMD sound redirect feature from other apps ?
« Reply #13 on: January 29, 2021, 02:35:44 pm »

Played a bit, but not sure if JRiver is able to pick it up.
Adding a virtual soundcard is the easy part.....
Tested with Qobuz, which uses the virtual card.
but then  :-\

Code: [Select]
pacmd load-module module-null-sink sink_name=JRiver
pacmd update-sink-proplist JRiver device.description=JRiver
pacmd load-module module-loopback sink=JRiver

Logged
Pages: [1]   Go Up