|
View:
New views
16 Messages
—
Rating Filter:
Alert me
|
|
|
JACK port namingHi,
I'd like to use ecasound to mix multiple JACK stereo inputs to a single stereo output. My setup looks something like this: ecasound -a:foo -i jack_generic,foo \ -a:bar -i jack_generic,bar \ ... -a:all -o jack The problem is that the port numbers are ascending regardless of the port name prefixes, so the ports for the second input are called bar_3 and bar_4, instead of bar_1 and bar_2 as I'd expect. Is there a way to get port names suffixed with _1 and _2 for each stereo input? Thanks, Dominic ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Ecasound-list mailing list Ecasound-list@... https://lists.sourceforge.net/lists/listinfo/ecasound-list |
|
|
Re: JACK port namingHi!
Not to my knowledge. But is it so important? If you create the chain-setup, you'll always know which port is which. If youneed this for evil scripting, you could still determine the port-numbers in your script. A bit more evil still, yet possible. Sorry, I don't have an exact answer to your problem. Kindest regards Julien -------- Music was my first love and it will be my last (John Miles) ======== FIND MY WEB-PROJECT AT: ======== http://ltsb.sourceforge.net the Linux TextBased Studio guide ======= AND MY PERSONAL PAGES AT: ======= http://www.juliencoder.de ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Ecasound-list mailing list Ecasound-list@... https://lists.sourceforge.net/lists/listinfo/ecasound-list |
|
|
Re: JACK port namingOn Sun, Sep 7, 2008 at 10:40 AM, Julien Claassen <julien@...> wrote:
> Hi! > Not to my knowledge. But is it so important? It's not so important, but I find starting at 1 for each name prefix much more intuitive and less error prone. ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Ecasound-list mailing list Ecasound-list@... https://lists.sourceforge.net/lists/listinfo/ecasound-list |
|
|
Re: JACK port namingOn Sunday 07 September 2008 10:40:16 Julien Claassen wrote:
> Not to my knowledge. But is it so important? If you create the > chain-setup, you'll always know which port is which. If youneed this for > evil scripting, you could still determine the port-numbers in your > script. A bit more evil still, yet possible. What's so evil about scripting? ;) Actually, in this case I'm using Qjackctl's patchbay to auto-connect the ports. Qjackctl allows the use of wildcards for port names, but as far as I can tell there's no way to match *two* adjacent ports with a common prefix. Is there any particular reason not to start counting at 1 for each prefix? I could make a patch if there's consensus that this should be changed. Dominic ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Ecasound-list mailing list Ecasound-list@... https://lists.sourceforge.net/lists/listinfo/ecasound-list |
|
|
Re: JACK port namingHi!
Dominic, if you write a patch, then do it on a little more general basis. Allow ports to have freely choosable names. But I think about the port names starting at one and then just going up has a good reason: Who knows what the chosen client-names will be. It was nice to name them foo and bar and whatever. But someone could do it like: foo, bar, foo, whatever, bar... Some additional checking would be required. More information would have to be stored: How many ports did I give away for this client already? Kindest regards Julien -------- Music was my first love and it will be my last (John Miles) ======== FIND MY WEB-PROJECT AT: ======== http://ltsb.sourceforge.net the Linux TextBased Studio guide ======= AND MY PERSONAL PAGES AT: ======= http://www.juliencoder.de ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Ecasound-list mailing list Ecasound-list@... https://lists.sourceforge.net/lists/listinfo/ecasound-list |
|
|
Re: JACK port naming [patch]On Monday 08 September 2008 10:00:49 Julien Claassen wrote:
> Dominic, if you write a patch, then do it on a little more general > basis. Allow ports to have freely choosable names. > But I think about the port names starting at one and then just going > up has a good reason: Who knows what the chosen client-names will be. It > was nice to name them foo and bar and whatever. But someone could do it > like: foo, bar, foo, whatever, bar... Some additional checking would be > required. More information would have to be stored: How many ports did I > give away for this client already? Hi Julien, Making port numbers start at one for each prefix turned out to be fairly straightforward, a patch is attached. It's still possible to use the same prefix for multiple inputs/outputs, the ports will then simply use the next number available. And besides, this also fixes a segfault that occured when using the same prefix for inputs and outputs (ecasound -i jack_generic,foo -o jack_generic,foo), because JACK doesn't allow two ports with the same name, even if one is input and the other is output. Cheers, Dominic [ecasound-jack-port-names.diff] diff -ru ../ecasound-2.5.2.orig/libecasound/plugins/audioio_jack_manager.cpp libecasound/plugins/audioio_jack_manager.cpp --- ../ecasound-2.5.2.orig/libecasound/plugins/audioio_jack_manager.cpp 2008-07-10 19:00:09.000000000 +0200 +++ libecasound/plugins/audioio_jack_manager.cpp 2008-09-07 23:14:38.000000000 +0200 @@ -30,6 +30,7 @@ #include <algorithm> /* std::count() */ #include <iostream> #include <string> +#include <utility> #include <sys/time.h> /* gettimeofday() */ #include <errno.h> /* ETIMEDOUT */ @@ -1417,8 +1418,13 @@ portdata->total_latency = 0; portdata->cb_buffer = new jack_default_audio_sample_t [cb_allocated_frames_rep]; + std::map<string, int>::iterator it = port_numbers_rep.find(portprefix); + if (it == port_numbers_rep.end()) { + it = port_numbers_rep.insert(std::make_pair(portprefix, 0)).first; + } + string tport = portprefix + "_" + kvu_numtostr(++it->second); + if (node->aobj->io_mode() == AUDIO_IO::io_read) { - string tport = portprefix + "_" + kvu_numtostr(inports_rep.size() + 1); portdata->jackport = jack_port_register(client_repp, tport.c_str(), JACK_DEFAULT_AUDIO_TYPE, @@ -1427,7 +1433,6 @@ inports_rep.push_back(portdata); } else { - string tport = portprefix + "_" + kvu_numtostr(outports_rep.size() + 1); portdata->jackport = jack_port_register(client_repp, tport.c_str(), JACK_DEFAULT_AUDIO_TYPE, @@ -1710,6 +1715,8 @@ open_rep = false; + port_numbers_rep.clear(); + ECA_LOG_MSG(ECA_LOGGER::user_objects, "Succesfully closed JACK server connection."); diff -ru ../ecasound-2.5.2.orig/libecasound/plugins/audioio_jack_manager.h libecasound/plugins/audioio_jack_manager.h --- ../ecasound-2.5.2.orig/libecasound/plugins/audioio_jack_manager.h 2008-07-10 19:09:58.000000000 +0200 +++ libecasound/plugins/audioio_jack_manager.h 2008-09-07 22:58:36.000000000 +0200 @@ -4,6 +4,7 @@ #include <list> #include <string> #include <vector> +#include <map> #include <pthread.h> #include <jack/jack.h> @@ -203,6 +204,8 @@ vector<eca_jack_port_data_t*> inports_rep; vector<eca_jack_port_data_t*> outports_rep; + std::map<string, int> port_numbers_rep; /** highest port number used for each prefix */ + int jackslave_seekahead_rep; long int jackslave_seekahead_target_rep; ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Ecasound-list mailing list Ecasound-list@... https://lists.sourceforge.net/lists/listinfo/ecasound-list |
|
|
Re: JACK port naming [patch]On Mon, Sep 8, 2008 at 3:52 PM, Dominic Sacré <dominic.sacre@...> wrote:
> Making port numbers start at one for each prefix turned out to be fairly > straightforward, a patch is attached. Works nicely on OS X. Thanks for the patch. ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Ecasound-list mailing list Ecasound-list@... https://lists.sourceforge.net/lists/listinfo/ecasound-list |
|
|
Re: JACK port naming [patch]Hi,
On Mon, 8 Sep 2008, Dominic Sacré wrote: > Making port numbers start at one for each prefix turned out to be fairly > straightforward, a patch is attached. It's still possible to use the same thanks a lot, the patch looks good to me. The only reason why I didn't yet commit this to the git tree is that this might break someone's scripts. In the past we've been very conservative about maintaining backward compatibility of command-line options. Others, any opinions about this? Personally, I'm leaning towards to accepting the patch. Ecasound's JACK code was developed during very early days of JACK (in 2001-02), and at that time it was far from clear how people would end up using the system. Things like "jack_alsa" look a bit dated now, and I think "jack_generic" suffers partly from the same design rot. I agree that if someone needs to use "jack_generic" (versus e.g. "jack"), it is likely she would appreciate predictable port numbering as well. > And besides, this also fixes a segfault that occured when using the same > prefix for inputs and outputs (ecasound -i jack_generic,foo -o > jack_generic,foo), because JACK doesn't allow two ports with the same name, > even if one is input and the other is output. And this is yet another reason to change "jack_generic". -- ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Ecasound-list mailing list Ecasound-list@... https://lists.sourceforge.net/lists/listinfo/ecasound-list |
|
|
Re: JACK port naming [patch]> The only reason why I didn't yet commit this to the git tree is that this
> might break someone's scripts. In the past we've been very conservative > about maintaining backward compatibility of command-line options. > > Others, any opinions about this? > The safer way would be to add an option like this --enable-jack_port_name or something like this Regards Philippe ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Ecasound-list mailing list Ecasound-list@... https://lists.sourceforge.net/lists/listinfo/ecasound-list |
|
|
|
|
|
Re: JACK port naming [patch]Not helpfull in the discussion: But WHY deprecate jack_alsa. I'd say don't.
It's a very useful shorthand. perhaps give it some config option, which can also be stored in ecasoundrc (to tell ecasound which alsa prots to use preferredly for input and output. Kindest regards Julien -------- Music was my first love and it will be my last (John Miles) ======== FIND MY WEB-PROJECT AT: ======== http://ltsb.sourceforge.net the Linux TextBased Studio guide ======= AND MY PERSONAL PAGES AT: ======= http://www.juliencoder.de ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Ecasound-list mailing list Ecasound-list@... https://lists.sourceforge.net/lists/listinfo/ecasound-list |
|
|
Re: JACK port naming [patch]On Wed, Sep 10, 2008 at 8:49 AM, Julien Claassen <julien@...> wrote:
> Not helpfull in the discussion: But WHY deprecate jack_alsa. I'd say don't. I'm using jack_auto without any parameter instead of jack_alsa. On OS X jack_alsa is useless anyway. Maybe I'm missing something, is there anything that jack_alsa does which is not provided by jack_auto? ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Ecasound-list mailing list Ecasound-list@... https://lists.sourceforge.net/lists/listinfo/ecasound-list |
|
|
Re: JACK port naming [patch]Hi,
On Tue, 9 Sep 2008, Dubphil wrote: >> The only reason why I didn't yet commit this to the git tree is that this >> might break someone's scripts. In the past we've been very conservative [...] > > The safer way would be to add an option like this --enable-jack_port_name > or something like this it would be, but I really dislike adding more configure options. They are easy to add, but costly to maintain (uncaught bugs, documentation that doesn't apply to all builds, etc). -- ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Ecasound-list mailing list Ecasound-list@... https://lists.sourceforge.net/lists/listinfo/ecasound-list |
|
|
Re: JACK port naming [patch]Hi,
On Tue, 9 Sep 2008, Oliver Oli wrote: [what to do with jack_generic] > > Could we deprecate jack_alsa? I'm afraid not... I've been using it in all possible places (documentation, examples, ..) since early JACK support, so it's impossible to get rid of now. When 'jack_alsa' was added, JACK was Linux only and also ALSA-only. Of course now this seems really dated. A more generic solution would be to have 'jack_physical', which would connect to first client, which has matching physical ports ("alsa_pcm" on Linux/ALSA, "coreaudio" on OS X and "freebob_pcm" Freebob Fireware devices). This can be implemented as JACK defines a "physical" port property, which JACK clients can advertise. Of course, having too many options might lead to confusion as well (jack, jack_alsa, jack_physical, jack_generic, ...). But "jack_physical" would definitely be a useful addition, as it allows moving scripts and saved setups from one system to another (let's say from Linux to OS X). None of the other alternatives allow this (well, except "jack", but then you have to connect the ports yourself). > And why not give jack and jack_generic the same options, deprecate > jack_generic (but keep it available for some more years) and simplify > everything to: > > jack > jack,local_portprefix > jack,local_portprefix,remote_client Hmm, this actually sounds very sensible. So existing "jack_generic" would continue to work as it is, but marked deprecated. "jack" without params would remain the same, but as a new feature, you could define the local prefix (with Dominic's patch applied so numbering would be per portprefix) plus an optional auto-connect destination. With this change "jack_alsa" and "jack_auto" became just shorthands (that may be deprecated, but I think we need to keep these around anyways as they are much more widely used/marketed than "jack_generic"). Can anyone point any fatal flaws in this? -- ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Ecasound-list mailing list Ecasound-list@... https://lists.sourceforge.net/lists/listinfo/ecasound-list |
|
|
Re: JACK port naming [patch]Hello!
Kai: About jack_physical. For once: that's a mouthful, although very self-explanatory. But can't you simply "re-implement' jack_alsa a little. I hop, that the JACK team did something consistent here, but in all newer Jack-versions you have access to ALSA (and probably others) by system:capture_* system:playback_*. Thus the naming would be incorrect for OS X and others, but it would do its bidding, if asked to. Kindest regards Julien -------- Music was my first love and it will be my last (John Miles) ======== FIND MY WEB-PROJECT AT: ======== http://ltsb.sourceforge.net the Linux TextBased Studio guide ======= AND MY PERSONAL PAGES AT: ======= http://www.juliencoder.de ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Ecasound-list mailing list Ecasound-list@... https://lists.sourceforge.net/lists/listinfo/ecasound-list |
|
|
Re: JACK port naming [patch]Hi,
On Thu, 11 Sep 2008, Julien Claassen wrote: > Kai: About jack_physical. For once: that's a mouthful, although very > self-explanatory. But can't you simply "re-implement' jack_alsa a little. I yes, you are quite right. So with current git-tree, 'jack_alsa' is replaced simply with 'jack,system' and this is portable across systems (works on ALSA, OS X, etc). -- ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Ecasound-list mailing list Ecasound-list@... https://lists.sourceforge.net/lists/listinfo/ecasound-list |
| Free embeddable forum powered by Nabble | Forum Help |