sox-users@lists.sourceforge.net unofficial mirror
 help / color / mirror / code / Atom feed
* Can I specify the pulseaudio "application name"?
@ 2019-10-08 17:42 John W
  2019-10-09 10:18 ` Måns Rullgård
  0 siblings, 1 reply; 5+ messages in thread
From: John W @ 2019-10-08 17:42 UTC (permalink / raw)
  To: sox-users

Sometimes I play sounds from commandline with the 'play' command. This
shows up as a pulseaudio stream (aka 'sink source') named "SoX". I can
adjust the volume for that stream separate from others on my system,
no problem.

But what I'd like to do is have some set of these (eg: notification
sounds) be a different volume from others (eg: all the rest). So, I
thought maybe there's some way to specify a pulseaudio application
name other than "SoX" (maybe "SoX-my-notifications", or somesuch).
Then, I can adjust the volume for that separately, and pulse will
remember it.

But so far, I haven't found any way to do this.

Anyone know if this is possible?

I made a SO post here with some more details:
https://stackoverflow.com/questions/58277896/how-do-i-specify-the-puseaudio-application-name-when-playing-a-sound-with-sox

Thanks
-John


_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Can I specify the pulseaudio "application name"?
  2019-10-08 17:42 Can I specify the pulseaudio "application name"? John W
@ 2019-10-09 10:18 ` Måns Rullgård
  2019-10-09 16:42   ` Jeremy Nicoll - ml sox users
  0 siblings, 1 reply; 5+ messages in thread
From: Måns Rullgård @ 2019-10-09 10:18 UTC (permalink / raw)
  To: John W; +Cc: sox-users

John W <jwdevel@gmail.com> writes:

> Sometimes I play sounds from commandline with the 'play' command. This
> shows up as a pulseaudio stream (aka 'sink source') named "SoX". I can
> adjust the volume for that stream separate from others on my system,
> no problem.
>
> But what I'd like to do is have some set of these (eg: notification
> sounds) be a different volume from others (eg: all the rest). So, I
> thought maybe there's some way to specify a pulseaudio application
> name other than "SoX" (maybe "SoX-my-notifications", or somesuch).
> Then, I can adjust the volume for that separately, and pulse will
> remember it.
>
> But so far, I haven't found any way to do this.
>
> Anyone know if this is possible?

There is currently no way to set the name.  It is hard-coded here:
https://sourceforge.net/p/sox/code/ci/master/tree/src/pulseaudio.c#l65

-- 
Måns Rullgård


_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Can I specify the pulseaudio "application name"?
  2019-10-09 10:18 ` Måns Rullgård
@ 2019-10-09 16:42   ` Jeremy Nicoll - ml sox users
  2019-10-10  6:26     ` John W
  0 siblings, 1 reply; 5+ messages in thread
From: Jeremy Nicoll - ml sox users @ 2019-10-09 16:42 UTC (permalink / raw)
  To: sox-users

On 2019-10-09 11:18, Måns Rullgård wrote:

> There is currently no way to set the name.  It is hard-coded here:
> https://sourceforge.net/p/sox/code/ci/master/tree/src/pulseaudio.c#l65

If one made a copy of  sox.exe  and used a binary editor, could one
alter the 'sox' literal that's inside the .exe to something else
and still have it work?   Or will the literal that's used for this
purpose also be used for other parts of sox?

(I appreciate that even if it's possible it might not be easy to find
the right instance, if there's more than one, inside the .exe ... and
if the .exe does any checksumming of its own contents to ensure it's
not corrupt, this would break that too).

-- 
Jeremy Nicoll - my opinions are my own


_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Can I specify the pulseaudio "application name"?
  2019-10-09 16:42   ` Jeremy Nicoll - ml sox users
@ 2019-10-10  6:26     ` John W
  2019-10-10  8:31       ` Måns Rullgård
  0 siblings, 1 reply; 5+ messages in thread
From: John W @ 2019-10-10  6:26 UTC (permalink / raw)
  To: sox-users

>> There is currently no way to set the name.
>
> If one made a copy of  sox.exe  and used a binary editor, could one
> alter the 'sox' literal that's inside the .exe to something else

Ah, too bad it's hardcoded.
Yeah, I suppose outside of hex editing the binary another option would
be creating my own 'play-xyz' command that uses libsox to do the heavy
lifting. Maybe with a python wrapper of libsox, or similar.

Thanks
-John


_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Can I specify the pulseaudio "application name"?
  2019-10-10  6:26     ` John W
@ 2019-10-10  8:31       ` Måns Rullgård
  0 siblings, 0 replies; 5+ messages in thread
From: Måns Rullgård @ 2019-10-10  8:31 UTC (permalink / raw)
  To: John W; +Cc: sox-users

John W <jwdevel@gmail.com> writes:

>>> There is currently no way to set the name.
>>
>> If one made a copy of  sox.exe  and used a binary editor, could one
>> alter the 'sox' literal that's inside the .exe to something else
>
> Ah, too bad it's hardcoded.
> Yeah, I suppose outside of hex editing the binary another option would
> be creating my own 'play-xyz' command that uses libsox to do the heavy
> lifting. Maybe with a python wrapper of libsox, or similar.

Wouldn't it be simpler to edit the source code and build it yourself?

-- 
Måns Rullgård


_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-10-10  8:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-08 17:42 Can I specify the pulseaudio "application name"? John W
2019-10-09 10:18 ` Måns Rullgård
2019-10-09 16:42   ` Jeremy Nicoll - ml sox users
2019-10-10  6:26     ` John W
2019-10-10  8:31       ` Måns Rullgård

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/sox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).