[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Vendoring code in a (Non?)GNU ELPA package
From: |
Daniel Semyonov |
Subject: |
Re: Vendoring code in a (Non?)GNU ELPA package |
Date: |
Thu, 04 Jan 2024 17:02:45 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
>>>>> Stefan Kangas writes:
> Daniel Semyonov <daniel@dsemy.com> writes:
>>>>>>> Richard Stallman writes:
>>
>> >> My module only uses the audio playback API to play music
>> through >> Emacs. I don't currently have plans to make use of
>> other parts >> of the library.
>>
>> > I see. It woild not be a pronlem to use a simple free linraru
>> for > that. But maybe it is not necessary. Will `play-sound' do
>> the > job?
>>
>> Unfortunately no, for various reasons: - 'play-sound' blocks
>> Emacs while the sound is playing; the functions my module
>> implements play audio and manage playback asynchronously. -
>> 'play-sound' only supports playing WAV and AU files (though I see
>> now that sound data can also be passed as a string, so I could
>> implement decoding functions in C and use them together with
>> 'play-sound' to play any sound file IIUC). - My module has been
>> successfully tested on Android, and should also work on Windows.
>> 'play-sound' doesn't work at all on Android, and passing sound
>> data as a string isn't supported on Windows.
> Is it possible to fix the above issues in `play-sound'? That
> would be preferable, because then it would benefit all users and
> not just those that use your module.
I don't see why it wouldn't be possible, though it would change the
behavior of `play-sound' slightly, so maybe a new function should be
introduced instead.
I could try to implement an `async-play-sound-internal' built-in
function (for GNU/Linux only at first), using the available subroutines
in "src/sound.c", though it might take me a while as I have near zero
experience with Emacs' C code, and this will be lower level than the
implementation in my module.
BTW, is using threads (pthreads) acceptable? I saw many files under
"src/" that include "pthread.h" but I couldn't find any file where a
thread is created (though maybe I missed something).
If not, I'm not really sure how to implement this (I only ever did async
programming in C using pthreads, and since I don't have any sort of
formal background in C, I never learned or tried any other method).
Thanks,
Daniel
- Re: Vendoring code in a (Non?)GNU ELPA package, Daniel Semyonov, 2024/01/01
- Re: Vendoring code in a (Non?)GNU ELPA package, Richard Stallman, 2024/01/02
- Re: Vendoring code in a (Non?)GNU ELPA package, Daniel Semyonov, 2024/01/03
- Re: Vendoring code in a (Non?)GNU ELPA package, Stefan Kangas, 2024/01/03
- Re: Vendoring code in a (Non?)GNU ELPA package,
Daniel Semyonov <=
- Re: Vendoring code in a (Non?)GNU ELPA package, Stefan Kangas, 2024/01/05
- Re: Vendoring code in a (Non?)GNU ELPA package, Daniel Semyonov, 2024/01/06
- Re: Vendoring code in a (Non?)GNU ELPA package, Stefan Kangas, 2024/01/06
- Re: Vendoring code in a (Non?)GNU ELPA package, No Wayman, 2024/01/06
- Re: Vendoring code in a (Non?)GNU ELPA package, Richard Stallman, 2024/01/07
- Re: Vendoring code in a (Non?)GNU ELPA package, No Wayman, 2024/01/07
- Re: Vendoring code in a (Non?)GNU ELPA package, Stefan Kangas, 2024/01/10
- Re: Vendoring code in a (Non?)GNU ELPA package, Richard Stallman, 2024/01/05