Date: Mon, 22 Mar 2021 08:41:20 -0700 From: Chris <bsd-lists@bsdforge.com> To: Christos Margiolis <christos@christosmarg.xyz> Cc: freebsd-hackers@freebsd.org Subject: Re: [GSoC 2021] Project Proposal Message-ID: <93c692373cf35aae8dab4f1c63c38d08@bsdforge.com> In-Reply-To: <20210322144928.ry75v5nlfhpzcfir@pleb> References: <20210322144928.ry75v5nlfhpzcfir@pleb>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2021-03-22 07:49, Christos Margiolis wrote: > Hello, > > I'm a Computer Engineering student and I'd like to propose a project for > GSoC 2021 and possibly attract a mentor. This idea has already got some > small traction on #freebsd (Freenode) by people involved with the project. > > To not bore with useless information, I basically wanted to implement a > "toggle" option for mixer(8) so that you can mute and unmute the mixer > easily > without having to write external scripts to do that. Others have apparently > asked for the same thing in the forums too. > > However, in order to be able to mute and unmute the mixer requires the > program > to have knowledge of the previous volume so that it can set it back, which > means > that since mixer(8) is an one-shot program, it would have to write a file to > the > disk, which is not the most pretty solution. Every version of mixer that I have run keeps state in /var/db/mixerN-state: vol 100:100 pcm 100:100 where N is (0-9) which represents a previous state. This has been the case for as long as I can remember. It's much the same WiFi lease(s). Unless I'm missing something IMHO it's current incarnation seems trivial to work with / manipulate. One might consider using JSON notation in it to allow for more advanced features and manipulation / reading / status I suppose. I'm not trying to take the wind out of your sails, or anything. Just sharing my own personal observation. :-) --Chris > > To fix that, after discussing this on IRC, me and debdrup thought it'd be > better > to wrap mixer(8)'s functionality in a new library called libmixer(3) for the > following reasons: > > 1. Userland programs will be able to use the mixer more easily > using this library. > > 2. In order to solve the mixer toggling "issue" without having to > write anything to disk, a new daemon called mixerd(8) can be > written using libmixer(3) to keep track of the volume history > among other things. > > 3. mixer(8) will use libmixer(3). > > 4. Already existing mixer ports such as MixerTUI > (https://www.freshports.org/audio/mixertui) can use the library > as well. > > Apart from the reasons I mentioned above, which I think would make > mixer handling easier and more extensible, I think this library could > go as far as to implement support for virtual_oss and the like. > > To make things more straight forward, I've already written a basic > libmixer(3) which currently implements almost all of mixer(8)'s > functionality. > I also rewrote mixer(8) to use my libmixer(3) and it seems to be working > as expected, although I cannot test everything yet. > > The code can be found in the following links: > > GitHub: https://github.com/christosmarg/libmixer > My personal Git server: https://git.christosmarg.xyz/libmixer/files.html > > Code review is especially welcome, although at the moment it's at a very > early stage - currently only 1 commit. > > My involvement with the FreeBSD Project also includes the following: > > 1. Wrote a guide Arduino development on FreeBSD without > having to rely on the Arduino IDE: > > https://wiki.freebsd.org/Arduino/NativeCLI > > 2. Reported 2 bugs, including 1 fix: > > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=254289 > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=254290 > > 3. Active on IRC, mostly Freenode and sometimes > EFNet (@crm). > > ---------------------------------------------- > Christos Margiolis <christos@christosmarg.xyz>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?93c692373cf35aae8dab4f1c63c38d08>