{"id":22654003,"url":"https://github.com/alsa-project/alsa-gobject","last_synced_at":"2025-04-12T04:12:08.576Z","repository":{"id":37011107,"uuid":"227817569","full_name":"alsa-project/alsa-gobject","owner":"alsa-project","description":"ALSA libraries compatible with GObject introspection (g-i) for language bindings (direct kernel usage, no alsa-lib wrappers).","archived":false,"fork":false,"pushed_at":"2024-03-15T06:25:27.000Z","size":920,"stargazers_count":19,"open_issues_count":0,"forks_count":3,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-12T04:12:02.941Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alsa-project.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2019-12-13T10:45:19.000Z","updated_at":"2025-02-04T04:53:36.000Z","dependencies_parsed_at":"2024-03-15T07:25:07.860Z","dependency_job_id":"ae9eb725-b6f6-4c59-9bd6-6c06ea4e74e5","html_url":"https://github.com/alsa-project/alsa-gobject","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alsa-project%2Falsa-gobject","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alsa-project%2Falsa-gobject/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alsa-project%2Falsa-gobject/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alsa-project%2Falsa-gobject/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alsa-project","download_url":"https://codeload.github.com/alsa-project/alsa-gobject/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248514205,"owners_count":21116903,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-09T09:31:57.702Z","updated_at":"2025-04-12T04:12:08.541Z","avatar_url":"https://github.com/alsa-project.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"========================\nThe alsa-gobject project\n========================\n\n2022/06/30\nTakashi Sakamoto\n\nIntroduction\n============\n\nThis project is a sub project in Advanced Linux Sound Architecture a.k.a ALSA,\nto produce libraries compatible with GObject introspection (g-i) for language\nbindings.\n\nThe latest release is `0.3.0 \u003chttps://github.com/alsa-project/alsa-gobject/releases/tag/v0.3.0\u003e`_.\n\nLibraries produced by the project\n=================================\n\nlibalsactl0\n    For APIs to operate ALSA control character device\nlibalsatimer0\n    For APIs to operate ALSA timer character device\nlibalsaseq0\n    For APIs to operate ALSA seq character device, depending on libalsatimer0\nlibalsahwdep0\n    For APIs to operate ALSA hwdep character device\nlibalsarawmidi0\n    For APIs to operate ALSA rawmidi character device\n\nNamespaces of g-i produced by the project\n=========================================\n\nALSACtl-0.0\n    For bindings to use the ``libalsactl0``\nALSATimer-0.0\n    For bindings to use the ``libalsatimer0``\nALSASeq-0.0\n    For bindings to use the ``libalsaseq0``\nALSAHwdep-0.0\n    For bindings to use the ``libalsahwdep0``\nALSARawmidi-0.0\n    For bindings to use the ``libalsarawmidi0``\n\nDocumentation\n=============\n\n`\u003chttps://alsa-project.github.io/alsa-gobject-docs/\u003e`_\n\nPython 3 Samples\n================\n\nSee samples directory.\n\nLicense\n=======\n\nThis software is licensed under GNU Lesser General Public License version 3 or later\n\nDependencies\n============\n\n* GLib `\u003chttps://gitlab.gnome.org/GNOME/glib\u003e`_\n* GObject introspection `\u003chttps://gi.readthedocs.io/\u003e`_\n* libudev1 `\u003chttps://www.freedesktop.org/wiki/Software/systemd/\u003e`_\n* Linux kernel version 4.5 or later\n\nRequirements to build\n=====================\n\n* UAPI header of Linux kernel\n* Meson build system `\u003chttps://mesonbuild.com/\u003e`_\n* Ninja build system `\u003chttps://ninja-build.org/\u003e`_\n* PyGObject `\u003chttps://pygobject.readthedocs.io/\u003e`_ (optional to run unit tests)\n* gi-docgen `\u003chttps://gnome.pages.gitlab.gnome.org/gi-docgen/\u003e`_ (optional to generate API documentation)\n\nHow to build\n============\n\nPreparation ::\n\n    $ meson (--prefix=install-directory) build-directory\n\nBuild ::\n\n    $ meson compile -C build-directory\n\nTest ::\n\n    $ meson test -C build-directory\n    (PyGObject \u003chttps://pygobject.readthedocs.io/\u003e is required)\n\nInstall ::\n\n    $ meson install -C build-directory\n\nAfter installed, C headers for APIs are available and pkg-config returns\narguments for them. For example ::\n\n    $ pkg-config --cflags --libs alsactl\n    -I/usr/include/alsa-gobject/ctl -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -lalsactl\n\nGenerate documentation ::\n\n    $ meson --prefix=install-directory -D doc=true build\n    $ meson install -C build\n    $ xdg-open (install-directory)/share/doc/alsa-gobject/index.html\n\nDesign note\n===========\n\n* These libraries are independent of alsa-lib, to focus on interaction to\n  kernel land directly by system calls without alsa-lib's configuration space\n  and plugin framework.\n* The way to enumerate any device is based on sysfs, programmed with libudev1.\n* GObject-drived object is used for structures in UAPI of Linux sound subsystem with\n  reserved space.\n* Boxed object is used for structures in UAPI of Linux sound subsystem without\n  reserved space.\n* The type which has variable size of storage in 32/64 bit ABI (e.g. long) is\n  not used for properties of GObject-derived objects.\n\nSupplemental information for language bindings\n==============================================\n\n* PyGObject `\u003chttps://pygobject.readthedocs.io/\u003e`_ is a dynamic loader for\n  libraries compatible with g-i.\n* alsa-gobject-rs `\u003chttps://github.com/alsa-project/alsa-gobject-rs/\u003e`_ includes\n  creates to use these libraries.\n\nValgrind suppression file for leak detected in glib\n===================================================\n\nThe execution of valgrind for executable binaries which link the libraries\ndetects some leaks inner glib, mainly due to allocation of type information.\nThis is expected and unavoidable. The `valgrind-glib.suppressions` file is\nincluded in this repository and available to suppress the report.\n\nFor example ::\n\n    $ valgrind --suppressions=valgrind-glib.suppressions --leak-check=full your-executable\n\nLoss of backward compatibility between v0.2/0.3 releases\n========================================================\n\nFollowing to GNOME convention for throw function\n------------------------------------------------\n\nIn GNOME convention, the throw function to report error at GError argument should return gboolean\nvalue to report the overall operation finished successfully or not. At v0.3 release, the most of\npublic API are rewritten according to it.\n\nUsing GObject Interface\n-----------------------\n\nGObject Interface is utilized for some cases to express structure with union.\n\n- ``ALSACtl.ElemInfoCommon`` and ``ALSACtl.ElemInfoSingleArray`` for ``struct snd_ctl_elem_info``\n- ``ALSASeq.QueueTimerCommon`` for ``struct snd_seq_queue_timer``\n\nTherefore some GObject-derived objects implements the interfaces.\n\n- ``ALSACtl.ElemInfoIec60958``\n- ``ALSACtl.ElemInfoBoolean``\n- ``ALSACtl.ElemInfoBytes``\n- ``ALSACtl.ElemInfoInteger``\n- ``ALSACtl.ElemInfoInteger64``\n- ``ALSACtl.ElemInfoEnumerated``\n- ``ALSASeq.QueueTimerAlsa``\n\nSome boxed structures are obsoleted and removed.\n\n- ``ALSACtl.ElemInfo``\n- ``ALSACtl.QueueTimer``\n- ``ALSACtl.QueueTimerDataAlsa``\n\nGObject Interface is utlized to define common feature of hwdep device as well.\n``ALSAHwdep.DeviceCommon`` interface is added for the purpose.\n\nEvent expression for ALSA Sequencer\n-----------------------------------\n\n``ALSASeq.Event`` boxed structure is newly added to each event, and ``ALSASeq.EventCntr`` is\nsimplified to include deserializer only. ``ALSASeq.EventError`` domain is newly added to express\nevent handling problem.\n\nName consistency in time stamp expression\n-----------------------------------------\n\nThe word ``tstamp`` is renamed to ``real time`` in the most of functions, enumerations, object\nnames, and methods for name consistency.\n\n- ``ALSATimer.TstampEvent`` boxed structure is renamed to ``ALSATimer.RealTimeEvent``\n- ``ALSATimer.EventType`` enumeration is renamed to ``ALSATimer.RealTimeEventType``\n- ``ALSATimer.EventDataType`` enumeration is renamed to ``ALSATimer.EventType``\n- ``ALSATimer.InstanceStatus.get_tstamp()`` method is renamed to ``ALSATimer.InstanceStatus.get_time()``\n- ``ALSATimer.get_tstamp_source()`` function is renamed to ``ALSATimer.get_real_time_clock_id()``\n\nIn time stamp, the counterpart of ``real time`` is ``tick``. ``ALSATimer.TickEvent`` boxed structure\nis renamed to ``ALSATimer.TickTimeEvent``. ``ALSATimer.Event``, ``ALSATimer.EventDataTick`` and\n``ALSATimer.EventDataTstamp`` are obsoleted and removed.  ``ALSATimer.UserInstance::handle-event``\nis obsoleted as well. The alternatives are available to retrieve corresponding event.\n\n- ``ALSATimer.UserInstance::handle-tick-time-event``\n- ``ALSATimer.UserInstance::handle-real-time-event``\n\n``ALSASeq.Tstamp`` is obsoleted and removed as well. The accessor methods to it are rewritten\nto retrieve either tick time or real time.\n\n- ``ALSASeq.Event.get_tick_time()``\n- ``ALSASeq.Event.get_real_time()``\n- ``ALSASeq.Event.get_tick_time_data()``\n- ``ALSASeq.Event.get_real_time_data()``\n- ``ALSASeq.EventDataQueue.get_tick_time_param()``\n- ``ALSASeq.EventDataQueue.get_real_time_param()``\n- ``ALSASeq.RemoveFilter.new_with_tick_time()``\n- ``ALSASeq.RemoveFilter.new_with_real_time()``\n\nThe word ``tstamp`` still remains in the enumerations and properties to affects both ``tick``\nand ``real time``.\n\n- ``ALSASeq.EventTstampMode``\n- ``ALSASeq.Event.get_tstamp_mode()``\n- ``ALSASeq.PortInfo:tstamp-mode``\n- ``ALSASeq.PortInfo:tstamp-overwrite``\n- ``ALSASeq.SusbscribeData:has-tstamp``\n- ``ALSASeq.SusbscribeData:tstamp-mode``\n\nSome properties are added to ``ALSASeq.SubscribeData`` to obsolete ``ALSASeq.PortSubscribeFlag``.\n\n- ``ALSASeq.SubscribeData:is-exclusive``\n- ``ALSASeq.SubscribeData:has-tstamp``\n- ``ALSASeq.SubscribeData:tstamp-mode``\n- ``ALSASeq.SubscribeData:queue-id``\n\nRewrite setter method in ALSACtl.ElemValue\n------------------------------------------\n\nBelow methods are rewritten to retrieve the pointer in internal storage instead of copying to given\nbuffer as fixed-sized array:\n\n- ``ALSACtl.ElemValue.get_bool``\n- ``ALSACtl.ElemValue.get_int``\n- ``ALSACtl.ElemValue.get_enum``\n- ``ALSACtl.ElemValue.get_bytes``\n- ``ALSACtl.ElemValue.get_iec60958_user_data``\n- ``ALSACtl.ElemValue.get_iec60958_channel_status``\n- ``ALSACtl.ElemValue.get_int64``\n\nRewrite ALSASeq.RemoveFilter\n----------------------------\n\nALSASeq.RemoveFilter is largely written so that it's GObject-derived object instead of boxed\nstructure for flexible configuration of filter condition.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falsa-project%2Falsa-gobject","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falsa-project%2Falsa-gobject","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falsa-project%2Falsa-gobject/lists"}