alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Takashi Sakamoto <o-takashi@sakamocchi.jp>
To: perex@perex.cz
Cc: alsa-devel@alsa-project.org
Subject: Re: [alsa-devel] Restart alsa-gi project as alsa-gobject project
Date: Wed, 4 Dec 2019 09:33:40 +0900	[thread overview]
Message-ID: <20191204003339.GA2876@workstation> (raw)
In-Reply-To: <20191201080449.GA408@workstation>

Hi Jaroslav,

On Sun, Dec 01, 2019 at 05:04:50PM +0900, Takashi Sakamoto wrote:
> Since Audio Mini Conference 2018, I continued to work for alsa-gi[1] in
> my local to integrate toward better I/O libraries. However I realized
> that its basic design includes some disadvantages to produce useful APIs.
> 
> I rethink the design and realize it better to wrap each of structures
> in <sound/asound.h> simply. Then, I restart it as alsa-gobject[2].
> At present, master branch includes a library, `libalsactl0` for the
> most of I/O features in ALSA control interface, which is compatible with
> GObject mechanism and GObject introspection.
> 
> Jaroslav, would you please delete the alsa-gi repository and fork
> the master branch from my alsa-gobject repository, then apply enough
> configurations to the new repository?
> 
> 
> My repository includes four branches as well for ALSA
> hwdep/rawmidi/timer/seq interfaces. The most of features in each
> interface is already available via included libraries but under heavy
> development.
> 
> I already start to test them with Python 3 (PyGObject) and they seem
> work well. I also test them with Rust bindings generated by gtk-rs/gir[3]
> tool. Near future I also publish Rust crates for further convenience.
> 
> 
> For your interests, this Python 3 script is a sample to listen one
> event from ALSA control character device. This simple program is not
> terminated voluntarily or by sending UNIX signal, thus please generate
> control event by alsamixer or amixer:
> 
> ```
> #!/usr/bin/env python3
> 
> import gi
> gi.require_version('GLib', '2.0')
> gi.require_version('ALSACtl', '0.0')
> from gi.repository import GLib, ALSACtl
> 
> class MyCard(ALSACtl.Card):
>     def __init__(self, card_id, ctx, dispatcher):
>         super().__init__()
>         self.open(card_id)
> 
>         self.create_source().attach(ctx)
> 
>         self.__dispatcher = dispatcher
> 
>     def do_handle_disconnection(self):
>         self.__dispatcher.quit()
> 
>     def do_handle_elem_event(self, elem_id, events):
>         # Print the first event and quit event loop.
>         print(elem_id.get_iface().value_nick,
>               elem_id.get_device_id(), elem_id.get_subdevice_id(),
>               elem_id.get_name(), elem_id.get_index(),
>               events.value_nicks)
>         self.__dispatcher.quit()
> 
> 
> ctx = GLib.MainContext.new()
> dispatcher = GLib.MainLoop.new(ctx, False)
> card = MyCard(0, ctx, dispatcher)
> 
> dispatcher.run()
> ```
> 
> [1] https://github.com/alsa-project/alsa-gi
> [2] https://github.com/takaswie/alsa-gobject
> [3] https://github.com/gtk-rs/gir

Would I expect your arrangement for this project, or should I continue
to develop it apart from alsa-project?


Regards

Takashi Sakamoto
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

  reply	other threads:[~2019-12-04  0:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-01  8:04 [alsa-devel] Restart alsa-gi project as alsa-gobject project Takashi Sakamoto
2019-12-04  0:33 ` Takashi Sakamoto [this message]
2019-12-04  9:10   ` Jaroslav Kysela
2019-12-04 13:34     ` Takashi Sakamoto
2019-12-13 11:17 ` Jaroslav Kysela
2019-12-14 16:52   ` Takashi Sakamoto
2019-12-18 19:20     ` Jaroslav Kysela
2019-12-22  8:04       ` Takashi Sakamoto
2019-12-25 11:11         ` Jaroslav Kysela
2019-12-28  4:30           ` Takashi Sakamoto

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191204003339.GA2876@workstation \
    --to=o-takashi@sakamocchi.jp \
    --cc=alsa-devel@alsa-project.org \
    --cc=perex@perex.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 NNTP newsgroup(s).