[MSEide-MSEgui-talk] MSE pcaudio.

2018-03-08 Thread fredvs
Hello. Congratulation for your new project: https://gitlab.com/mseide-msegui/pcaudiolib Pcaudio lib is a **very** small audio-output library compatible with Linux, FreeBSD, Windows, Mac OS and Android. It is part of the espeak-ng project but, sadly, nobody answers to questions about Pcaudio libr

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-08 Thread Martin Schreiber
On Thursday 08 March 2018 10:55:58 fredvs wrote: > > I did a Pascal wrapper for this library with a fpc sine-wave demo: > https://github.com/fredvs/pcaudiolib_pas > > Martin did his own MSE Pascal wrapper too (included in > https://gitlab.com/mseide-msegui/pcaudiolib). > Actually it is in https://g

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-08 Thread fredvs
Hello Martin. > An example is here: > https://gitlab.com/mseide-msegui/mseuniverse/tree/master/samples/audio/pcaudio Wow, magistral sine-wave demo. > It is in msepcaudio.pas:115. Indeed, after cleaning the glasses, it appears, sorry for the noise. > It is used in PulseAudio. Hah, ok, >> I'l

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-08 Thread Martin Schreiber
On Thursday 08 March 2018 16:25:13 fredvs wrote: > > Perfect, I did test and it works with wine too. > Little bémol (very, very little), only resolution of integer 16 and float > 32 are working for Windows (not integer 32). > from pcaudiolib src/windows.c: " HRESULT CreateWaveFormat(enum audio_obje

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-08 Thread fredvs
> case AUDIO_OBJECT_FORMAT_S32LE: return >CreateWaveFormatEx(WAVE_FORMAT_PCM, 32, rate, channels, wfmt); Yes, I did see this, it is why the **very little bémol** (PortAudio can deal it). But the most important resolutions (IMHO) are int16 and float32 (and both work perfectly). Thanks. Fr

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-08 Thread fredvs
> Little bémol (very, very little), only resolution of integer 16 and float > 32 are working for Windows (not integer 32). Fake news! It appends only with wine > integer 32 works perfect on real Windows 10 and friends. Sorry for the little noise. After playing with channels and sine-wave, I

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-09 Thread Martin Schreiber
On 09.03.2018 01:11, fredvs wrote: After playing with channels and sine-wave, I get good result with last parameter of audio_object_write(), in Unix: number of bytes div channels. in Windows: number of bytes. For me it is always the buffer size in bytes, please see the extended demo: https:/

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-09 Thread fredvs
> For me it is always the buffer size in bytes, please see the extended demo: > https://gitlab.com/mseide-msegui/mseuniverse/tree/master/samples/audio/pcaudio Hum, indeed, i have to re-check my code, something strange appended... On my (maybe corrupted) Linux Mint 17 64 bit system, mse-pcaudio-d

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-09 Thread Martin Schreiber
On Friday 09 March 2018 17:01:50 fredvs wrote: > > For me it is always the buffer size in bytes, please see the extended > > demo: > > https://gitlab.com/mseide-msegui/mseuniverse/tree/master/samples/audio/pc > >audio > > Hum, indeed, i have to re-check my code, something strange appended... > > On

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-09 Thread fredvs
> "alsa" pcaudiolib afaik is buggy. Grr. > Don't you have "pulseaudio" installed? Yes, but it seems that pcaudiolib wants something more at compilation. Something like pulseaudio-dev (Gr x2). And I would prefer a "pure" audio-library that can deal with root sound-drivers, like alsa or os

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-09 Thread fredvs
Hello Martin.OK, I did:# sudo apt-get install libpulse-dev ---> OK, installed.Re-configure (ok, Pulse audio recognized) + make all + sudo make install > OK, libpcaudio.so.0 installed.But now, with the mse-pcaudio-demo, after 2xclick on "Sound on" : crash with error message: SIGABORT...Stack:#

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-09 Thread fredvs
Ooops, what appends with the previous message-layout ? Ok, I try again: Hello Martin. OK, I did: # sudo apt-get install libpulse-dev ---> OK, installed. Re-configure (ok, Pulse audio recognized) + make all + sudo make install > OK, libpcaudio.so.0 installed. But now, with the mse-pcaudio-demo

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-09 Thread Martin Schreiber
On Friday 09 March 2018 17:43:55 fredvs wrote: > Hello Martin.OK, I did:# sudo apt-get install libpulse-dev ---> OK, > installed.Re-configure (ok, Pulse audio recognized) + make all + sudo make > install > OK, libpcaudio.so.0 installed.But now, with the > mse-pcaudio-demo, after 2xclick on "S

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-09 Thread fredvs
>libpcaudio.so.0 binaries are here: > https://sourceforge.net/projects/mseuniverse/files/eSpeakNG/ OK, I did download libpcaudio.so.0 from https://sourceforge.net/projects/mseuniverse/files/eSpeakNG/ Then copy it to /usr/local/lib and (to be sure) in root directory of /mse-pcaudio/ Now, after 2

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-09 Thread Martin Schreiber
On Friday 09 March 2018 18:04:56 fredvs wrote: > > PS: AFAIK, PulseAudio does use ALSA. > But " ##0  F70E8C37 raise.c:56 __GI_raise(sig=6, sig@entry=6) #1  F70EC028 abort.c:89 __GI_abort() #2  F37B503D :0 pa_mutex_free() #3  F3C1233A :0 pa_threaded_mainloop_free() #4  F1D45165 :0 pulse_free() #5  F

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-09 Thread fredvs
Re-hello Martin. If I may Doing this in procedure tmainfo.onsetev() line 243: channels:= 2; // force 2 channels. (with channels as global variable) // if ch1on.value and ch2on.value then begin // channels:= 2; // end; And this for procedure tmainfo.waveexe() line 127: // twoc

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-09 Thread Martin Schreiber
On 03/09/2018 07:12 PM, fredvs wrote: > > But adding this in tmainfo.waveexe() line 168: > > i1:= audio_object_write(faudioobj,p1,bytelen div channels); > > > Sound perfect. > As you like. ;-) -- Check out the vib

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-09 Thread fredvs
>About the crash, ok, I will investigate. >(But my nose say it is not a pcaudiolib problem) ... Ok, I trusted my nose and ... in procedure tmainfo.soundoff(), line 215: if oned.value then begin wavethread.terminate(); sleep(100); // Adding this. if faudioobj <> nil then

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-09 Thread Martin Schreiber
On 03/09/2018 07:30 PM, fredvs wrote: >> About the crash, ok, I will investigate. >> (But my nose say it is not a pcaudiolib problem) ... > > Ok, I trusted my nose and ... > > in procedure tmainfo.soundoff(), line 215: > > if oned.value then begin > wavethread.terminate(); > > sleep(100

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-09 Thread fredvs
> As you like. ;-) Huh, you do not trust me ? main.zip -- Sent from: http://mseide-msegui-talk.13964.n8.nabble.com/ -- Check out the vibrant tech com

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-09 Thread fredvs
> Is this a workaround or a bug fix? Ho, it is a workaround to test pcaudiolib with your demo. Now for the bug-fix, I will propose something like (if wavethread has freeonterminate): wavethread.terminate(); while wavethread <> nil do sleep(1); Fre;D -- Sent from: http://mseide-msegui-talk

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-09 Thread Martin Schreiber
On 03/09/2018 07:34 PM, fredvs wrote: >> As you like. ;-) > > Huh, you do not trust me ? > > main.zip > Are you sure that the program still is OK with your changes? Martin --

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-09 Thread fredvs
> Are you sure that the program still is OK with your changes? Ok, re-re-re checked. With forced: ch1on.value := true; ch2on.value := true; twochannel:= true; channels := 2; and audio_object_write(faudioobj,p1,bytelen div channels) And with sleep(100) after wavethread.terminate() : ---

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-09 Thread fredvs
Re-re-re Hello. About the crash of the demo, this solves all on my system: procedure tmainfo.soundoff() at line 220: wavethread.terminate(); wavethread.active:= false; // add this here, not 4 lines later. Ok, I stop to annoy you with this. Fre;D -- Sent from: http://mseide-msegui-talk.

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-09 Thread Martin Schreiber
On 03/09/2018 08:09 PM, fredvs wrote: >> Are you sure that the program still is OK with your changes? > > Ok, re-re-re checked. > > With forced: > ch1on.value := true; > ch2on.value := true; > twochannel:= true; > channels := 2; > > and audio_object_write(faudioobj,p1,bytelen div channels

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-09 Thread Martin Schreiber
On 03/09/2018 10:29 PM, Martin Schreiber wrote: > There are more problems with pcaudiolib alsa driver because it is not > synchronous as the Windows and the Pulseaudio driver. It probably > doesn't care for eSpeak-ng because eSpeak-ng does internal timing but > by > feeding the audio data as fast a

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-09 Thread Martin Schreiber
On 03/09/2018 10:05 PM, fredvs wrote: > Re-re-re Hello. > > About the crash of the demo, this solves all on my system: > > procedure tmainfo.soundoff() at line 220: > > wavethread.terminate(); > wavethread.active:= false; // add this here, not 4 lines later. > The problem probably is " int

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-09 Thread fredvs
> The problem with the wrong buffer length is in pcaudiolib/source/src/alsa.c Wow, you are strong. Indeed it is the problem. > It probably should be > #define FORMAT(srcfmt, dstfmt, size) case srcfmt: pcm_format = dstfmt; > self->sample_size = size*channels; break; Yep, it is this. > Sugges

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-09 Thread Martin Schreiber
On 03/09/2018 10:55 PM, Martin Schreiber wrote: > On 03/09/2018 10:05 PM, fredvs wrote: >> Re-re-re Hello. >> >> About the crash of the demo, this solves all on my system: >> >> procedure tmainfo.soundoff() at line 220: >> >> wavethread.terminate(); >> wavethread.active:= false; // add this her

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-09 Thread Martin Schreiber
On 03/09/2018 10:57 PM, fredvs wrote: >> The problem with the wrong buffer length is in pcaudiolib/source/src/alsa.c > > Wow, you are strong. > Indeed it is the problem. > >> It probably should be >> #define FORMAT(srcfmt, dstfmt, size) case srcfmt: pcm_format = dstfmt; >> self->sample_size =

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-09 Thread fredvs
> It is not pulseaudio but alsa. Ok. I will attack this tomorrow. Many thanks Martin. Fre;D -- Sent from: http://mseide-msegui-talk.13964.n8.nabble.com/ -- Check out the vibrant tech community on one of the world's

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-09 Thread fredvs
> Ok. I will attack this tomorrow. Aaargh, I cannot resist. Bon, ok, re-try with libpcaudio.so,0 compiled with PulseAudio on. Ok, this time PulseAudio is used with your demo (and mine) and indeed "div chan" is not needed anymore for stereo channels. So, yes alsa.c is bugged. Not only the "numb

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-09 Thread Martin Schreiber
On 03/10/2018 12:26 AM, fredvs wrote: > > AFAIK ALSA is the kernel sound driver used by PulseAudio in Unix os. > Your stack: " ##0 F70E8C37 raise.c:56 __GI_raise(sig=6, sig@entry=6) #1 F70EC028 abort.c:89 __GI_abort() #2 F37B503D :0 pa_mutex_free() #3 F3C1233A :0 pa_threaded_mainloop_free() #

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-10 Thread fredvs
> seems to show that on your system Alsa calls Pulseaudio not the opposite. Hum, difficult to find info about this: https://en.wikipedia.org/wiki/PulseAudio Not lot of infos... I am nearly more than sure that alsa does not know PulseAudio and never call it in his code. But those days, so many

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-10 Thread fredvs
>> Please see attachment. > or this attachment. Huh, sorry but even with clean glasses, it seems to me that "alsa_object_write()" is a call to ALSA. Or I miss, one more time, something. ;-( In fact I know PulseAudio from his (buggy) beginning (2014). And yes, maybe my mind was altered because

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-10 Thread fredvs
Huh, sorry in previous mail, for the date, please read: In fact I know PulseAudio from his (buggy) beginning (2004). Fre;D -- Sent from: http://mseide-msegui-talk.13964.n8.nabble.com/ -- Check out the vibrant tech

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-10 Thread Martin Schreiber
On Saturday 10 March 2018 17:13:10 fredvs wrote: > >> Please see attachment. > > > > or this attachment. > > Huh, sorry but even with clean glasses, it seems to me that > "alsa_object_write()" is a call to ALSA. > You see that the program stops in Function pa_stream_write() in file /usr/src/debug/

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-10 Thread fredvs
> /usr/src/debug/pulseaudio-9-0/src/pulse/stream.c:1613 which clearly is a Pulseaudio function. > Agreed? OK. > snd_pcm_ioplug_writei()->snd1_pcm_write_areas()->ioplug_priv_transfer_areas(). > > Agreed? ... ... ... ... G, ..., ok. > https://en.wikipedia.org/wiki/PulseAudio > Thus, applic

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-10 Thread fredvs
> pulseaudio.png (163K) Download Attachment Just for confirmation... This was a print-screen of pcaudiolib using alsa or pulseaudio ? (Just now I have doubt, I was thinking it was a print-screen of pcaudiolib using pulseaudio). But maybe it was a print-screen of pcaudiolib using alsa. (And if

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-11 Thread Martin Schreiber
On Saturday 10 March 2018 21:46:34 fredvs wrote: > > pulseaudio.png (163K) Download Attachment > > Just for confirmation... > > This was a print-screen of pcaudiolib using alsa or pulseaudio ? > > (Just now I have doubt, I was thinking it was a print-screen of pcaudiolib > using pulseaudio). > > B

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-11 Thread fredvs
> so the pcaudiolib Alsa driver is active. Ha, that is more logic for me (even if I would prefer that pcaudiolib load a "pure" Alsa, but ok, capito, it must be done by PulseAudio). > Agreed? Now 200 % perfectly. ;-) About pcaudiolib with Alsa driver active With a samplerate = 44100 and a

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-11 Thread Martin Schreiber
On Sunday 11 March 2018 11:50:00 fredvs wrote: > About pcaudiolib with Alsa driver active > > With a samplerate = 44100 and a buffer = 44100 samples, logically it will > take 1 second to write the buffer in mono. > And for 3 seconds, 3x write the buffer by the loop. > > It is what appends in

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-11 Thread fredvs
(the latency time is not accessible in pcaudiolib!) Oooops. ;-( By the way, if some parameter should be added in some method, I would vote for a "NumChunck" parameter iin audio_object_write(pcaudioobj, buffer, bufferlength, numchunck)); With PortAudio, numchunck is the number of samples from t

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-11 Thread fredvs
> I would vote for a "NumChunck" parameter in audio_object_write() Maybe it will be easier to add it in audio_object_open(). And to prepare the future, add some "TypePut" (Input or Output) parameter too. ;-) Ok, I stop. Fre;D -- Sent from: http://mseide-msegui-talk.13964.n8.nabble.com/ ---

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-12 Thread Martin Schreiber
On Saturday 10 March 2018 17:13:10 fredvs wrote: > A other reason why I would like to have direct access to alsa is that some > Linux distro do not have PulseAudio installed. > For example the RaspbianPi distro is given without PulseAudio. > Maybe it can be controlled by the device parameter in c

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-12 Thread fredvs
> I assume if there is no PulseAudio installed, OK, asap, I will un-install PulseAudio and see what appends. Fre;D -- Sent from: http://mseide-msegui-talk.13964.n8.nabble.com/ -- Check out the vibrant tech community o

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-12 Thread fredvs
Hello Martin. You are the champion. Using this: audioobj := create_audio_device_object('sysdefault', nil, nil); makes that PulseAudio is not used anymore but the alsa kernel driver directly ! And... The sound is perfect and the duration with loops is ok, like using PulseAudio. Yep, yep, yep

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-12 Thread fredvs
Re-hello Martin. Aaargh, always a bémol somewhere... audioobj := create_audio_device_object('default', 'thename', 'theinfo'); > Do not get back to default (pulse), this must be done: audioobj := create_audio_device_object(nil, 'thename', 'theinfo'); PS: This is a very micro-mini bémol.

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-12 Thread fredvs
Hello Martin. Using this (pure alsa): audioobj := create_audio_device_object('sysdefault', nil, nil); Using this (pure pulseaudio): faudioobj:= create_audio_device_object(nil,pchar(''),pchar(''));

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-12 Thread fredvs
Aaargh bad image for pulse in previous post, here the good one. Hello Martin. Using this (pure alsa): audioobj := create_audio_device_object('sysdefault', nil, nil); Using this (pure pulseaudio): faudioobj:= create_audi

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-12 Thread fredvs
Re-re-re-... hello. For info about memory used: Fre;D -- Sent from: http://mseide-msegui-talk.13964.n8.nabble.com/ ---

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-12 Thread Martin Schreiber
On Monday 12 March 2018 17:09:37 fredvs wrote: > > Fixes (including Windows library name): > Why do need to change it? The default value of libnameed.value is "pcaudio.dll" set in object inspector. Martin -- Check out th

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-12 Thread Martin Schreiber
On 03/12/2018 02:28 PM, fredvs wrote: > Hello Martin. > > You are the champion. > > Using this: > > audioobj := create_audio_device_object('sysdefault', nil, nil); > > makes that PulseAudio is not used anymore but the alsa kernel driver > directly ! > > And... > > The sound is perfect and th

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-13 Thread fredvs
> Why do need to change it? Because I did forget to delete the status.sta after a cross-compilation. Sorry for the noise. > The problem with "pure" alsa mode is that Ok, I will study deeply your notes. Fre;D -- Sent from: http://mseide-msegui-talk.13964.n8.nabble.com/

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-13 Thread fredvs
> does not drop all buffers. Huh, do you have a idea how to fix this ? Fre;D -- Sent from: http://mseide-msegui-talk.13964.n8.nabble.com/ -- Check out the vibrant tech community on one of the world's most engaging te

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-13 Thread Martin Schreiber
On Tuesday 13 March 2018 12:11:05 fredvs wrote: > > does not drop all buffers. > > Huh, do you have a idea how to fix this ? > One needs to check what snd_pcm_drop() does and what data will not be dropped. Then one needs to find a workaround or Alsa must be fixed. Note: Please do not call audio_ob

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-13 Thread fredvs
> You can test it in mono mode if you change the sine frequency. Indeed ;-( What is strange too is that using snd_pcm_drain() gives strange result too. (In theory it should result only the delay to write all the buffer, but it gives a short extra sound too with alsa) Compiling pcaudiolib with th

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-13 Thread fredvs
> Then one needs to find a workaround Hello Martin. Till now, I do not get good result using only snd_pcm_drop to stop the stream. I m more lucky (with help of PortAudio code) with snd_pcm_drain. int alsa_object_flush(struct audio_object *object) { struct alsa_object *self = to_alsa_obje

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-14 Thread Martin Schreiber
On 03/13/2018 09:04 PM, fredvs wrote: >> Then one needs to find a workaround > > Hello Martin. > Till now, I do not get good result using only snd_pcm_drop to stop the > stream. > > I m more lucky (with help of PortAudio code) with snd_pcm_drain. > > int > alsa_object_flush(struct audio_object *

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-15 Thread fredvs
Hello. For infos: The quality of sound is equal with the 3 dri

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-15 Thread Martin Schreiber
On Thursday 15 March 2018 13:00:43 fredvs wrote: > Hello. > > For infos: > > > > g> > >

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-15 Thread fredvs
> and especially here: > http://mailman.alsa-project.org/pipermail/alsa-devel/2018-March/133351.html Huh, big fan, not yet... ;-) What I find strange is: how could it be possible that this "drop" problem (not release last buffer) appears only now. Alsa is a old project (1998), nobody did note th

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-15 Thread Martin Schreiber
On Thursday 15 March 2018 13:34:17 fredvs wrote: > > and especially here: > > http://mailman.alsa-project.org/pipermail/alsa-devel/2018-March/133351.ht > >ml > > Huh, big fan, not yet... ;-) > > What I find strange is: how could it be possible that this "drop" problem > (not release last buffer) ap

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-15 Thread fredvs
> Probably there are not so many responsive speech assistive systems on Linux. Yes but all the other applications that use alsa directly, they did not note this ? But maybe it is a recent new bug from a recent earlier commit. (Or that explains why some people say that pulse has a "better" sound..

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-15 Thread Martin Schreiber
On Thursday 15 March 2018 17:03:58 fredvs wrote: > > Probably there are not so many responsive speech assistive systems on > > Linux. > > Yes but all the other applications that use alsa directly, they did not > note this ? They do not *use* snd_pcm_drop(). Martin ---

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-15 Thread fredvs
> They do not *use* snd_pcm_drop(). Ok, they maybe use (like I do) snd_pcm_drain() but then there is that little "click" (That, IMHO, has similar origin). Fre;D -- Sent from: http://mseide-msegui-talk.13964.n8.nabble.com/ -

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-15 Thread fredvs
Hello Martin. Do you have plan to commit your workaround: http://mailman.alsa-project.org/pipermail/alsa-devel/2018-March/133327.html into https://gitlab.com/mseide-msegui/pcaudiolib ? Fre;D -- Sent from: http://mseide-msegui-talk.13964.n8.nabble.com/ --

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-15 Thread Martin Schreiber
On Thursday 15 March 2018 17:30:59 fredvs wrote: > Hello Martin. > > Do you have plan to commit your workaround: > http://mailman.alsa-project.org/pipermail/alsa-devel/2018-March/133327.html > > into > > https://gitlab.com/mseide-msegui/pcaudiolib > That is not my workaround but the wokaround the o

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-15 Thread fredvs
> Do you have plan to commit your workaround: > http://mailman.alsa-project.org/pipermail/alsa-devel/2018-March/133327.html With your workaround (re-compile pcaudio.so with your code) uos works perfectly. No more "click" at begin of sound (if a other was loaded before). No crash when other threa

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-15 Thread fredvs
Ooops, I did not see your answer. I will study it. Write you later. Fre;D -- Sent from: http://mseide-msegui-talk.13964.n8.nabble.com/ -- Check out the vibrant tech community on one of the world's most engaging tech

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-16 Thread fredvs
> It does better, see attached alsadrop2.c. $ gcc -oalsadrop2 -lasound -lpthread -g alsadrop2.c alsadrop2.c: In function ‘threadexe’: alsadrop2.c:35:3: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘snd_pcm_sframes_t’ [-Wformat=] printf("%d %p %d\n",i3,buf1,fram

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-16 Thread fredvs
Not yet... $ gcc -oalsadrop2 -lasound -lpthread -g alsadrop2.c `pkg-config --cflags --libs alsa` alsadrop2.c: In function ‘threadexe’: alsadrop2.c:38:3: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘snd_pcm_sframes_t’ [-Wformat=] printf("%d %p %d\n",i3,buf1,fram

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-16 Thread fredvs
Ok, I get it: $ gcc -oalsadrop2 -lasound -pthread -g alsadrop2.c `pkg-config --cflags --libs alsa` alsadrop2.c: In function ‘threadexe’: alsadrop2.c:38:3: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘snd_pcm_sframes_t’ [-Wformat=] printf("%d %p %d\n",i3,buf1,fr

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-16 Thread fredvs
Hello Martin. On my system, in alsadrop2.c with usleep(70) in line 124 ---> crash if using "sysdefault" alsa device. With usleep(100) or more ---> OK, no crash and my ears do not feel any difference with alsadrop2 compiled with device = "sysdefault" vs "default" (or missed something). In

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-17 Thread Martin Schreiber
On Friday 16 March 2018 23:31:31 fredvs wrote: > Hello Martin. > > On my system, in alsadrop2.c with usleep(70) in line 124 ---> crash if > using "sysdefault" alsa device. > > With usleep(100) or more ---> OK, no crash and my ears do not feel any > difference with alsadrop2 compiled with de

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-17 Thread fredvs
Hello Martin. Thanks for explanations. Ok, I will jump into alsa code (that I have to discover). Other thing. I am busy to make ideU compatible with C for compiling and debugging. It works perfectly (like for Pascal, Python and Java). But with C (and Java too) it could be that parameters are b

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-17 Thread Martin Schreiber
On Saturday 17 March 2018 14:21:58 fredvs wrote: > > But with C (and Java too) it could be that parameters are before and after > the source to compile. > > Example with your alsadrop2.c > > > gcc -oalsadrop2 -lasound -pthread -g alsadrop2.c `pkg-config --cflags > --libs alsa` > > You can see t

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-18 Thread fredvs
> Suggestion: use a compile or make script. Yes, of course, if a configure or make script is provided, I use it. > C is not foreseen to be compiled with a simple commandline. Yes, but many things can be done with a complicated commandline: ---> https://github.com/fredvs/ideU About our ALSA f

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-19 Thread Martin Schreiber
On Sunday 18 March 2018 17:20:44 fredvs wrote: > > Suggestion: use a compile or make script. > > Yes, of course, if a configure or make script is provided, I use it. > > > C is not foreseen to be compiled with a simple commandline. > > Yes, but many things can be done with a complicated commandlin

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-19 Thread Martin Schreiber
On Friday 16 March 2018 19:42:22 fredvs wrote: > Ok, I get it: > > $ gcc -oalsadrop2 -lasound -pthread -g alsadrop2.c `pkg-config --cflags > --libs alsa` On openSUSE it is sufficient to install the alsa-devel package. Martin --

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-19 Thread fredvs
>> I think that I will stay happy with your workaround on pcaudiolib > Which workaround? int alsa_object_flush(struct audio_object *object) { struct alsa_object *self = to_alsa_object(object); if (self && self->handle){ snd_pcm_drop(self->handle); }

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-19 Thread Martin Schreiber
On Monday 19 March 2018 12:03:15 fredvs wrote: > >> I think that I will stay happy with your workaround on pcaudiolib > > > > Which workaround? > > int > alsa_object_flush(struct audio_object *object) > { > struct alsa_object *self = to_alsa_object(object); > if (self && self->handl

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-19 Thread fredvs
Hello Martin. > That means you first call snd_pcm_drop() and then you close and reopen the > audio object? With your workaround ? Yes, it call snd_pcm_drop() but it is like doing nothing. Did you read/study mt post from Mar 18, 2018; 5:20pm? You will see that snd_pcm_drop() call, in fine, timer

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-19 Thread fredvs
> > Doesn't this crash a running write operatipns in another thread? In my system, with uos, if using 2 threads with "pure" alsa ---> no crash, both can play and if one stop, no crash. But if using 1 running thread with "pure" alsa and then loading a other thread with pulse --> the pulse thread

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-20 Thread Martin Schreiber
On Monday 19 March 2018 19:55:11 fredvs wrote: > Hello Martin. > > > That means you first call snd_pcm_drop() and then you close and reopen > > the audio object? > > With your workaround ? This is the code from original pcaudiolib " int alsa_object_flush(struct audio_object *object) { stru

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-20 Thread fredvs
Hello Martin. Could it be that you did not understand what I try to demonstrate ? In ALSA code, snd_pcm_drop(pcm) does nothing more than stop the timer of the alsa object. snd_pcm_drop(pcm) ===> snd_timer_hw_stop(snd_timer). But, sadly, snd_timer_hw_stop(snd_timer) does not work ;-(. Here t

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-20 Thread Martin Schreiber
On Tuesday 20 March 2018 12:27:34 fredvs wrote: > Hello Martin. > > Could it be that you did not understand what I try to demonstrate ? > > In ALSA code, > > snd_pcm_drop(pcm) does nothing more than stop the timer of the alsa object. > > snd_pcm_drop(pcm) ===> snd_timer_hw_stop(snd_timer). > > But

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-20 Thread fredvs
> can't help here because I don't know anything about Alsa. Ha, ok, so was I. ( But dont you name me in alsa-dev-mailing-list to try to find the bug ?). Fre;D -- Sent from: http://mseide-msegui-talk.13964.n8.nabble.com/ -

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-20 Thread Martin Schreiber
On Tuesday 20 March 2018 14:25:01 fredvs wrote: > > can't help here because I don't know anything about Alsa. > > Ha, ok, so was I. > > ( But dont you name me in alsa-dev-mailing-list to try to find the bug ?). > IIRC you wrote one should not use Pulseaudio but Alsa and you prefer Alsa over Pulse

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-20 Thread fredvs
Re-hello Martin. Re-about libasound.so (alsa library) and pulse. I did try, (to see what appends) to remove libasound.so from my system. Then reboot. Huh, pulse did not load and no sound, even with application that use "pure" pulse... Then re-add libasound.so in system + reboot. Now pulse is

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-20 Thread fredvs
> IRC you wrote one should not use Pulseaudio but Alsa and you prefer Alsa over > Pulseaudio because of its superior architecture since a long time? Huh, more or less... I did wrote that on some distros, Pulseaudio is not installed but only Alsa and it would be good that Pcaudio library could u

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-23 Thread fredvs
Hello. Added Input device + audio_object_openrec() + audio_object_read(). It is implemented (and perfectly working) for Pulse and "pure" ALSA. https://github.com/fredvs/pcaudiolib_io Added too Pascal demos of SimpleRecorder + ConsoleRec demos. https://github.com/fredvs/pcaudiolib_pas For Windo

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-23 Thread Martin Schreiber
On Friday 23 March 2018 11:50:23 fredvs wrote: > Hello. > > Added Input device + audio_object_openrec() + audio_object_read(). > It is implemented (and perfectly working) for Pulse and "pure" ALSA. > > https://github.com/fredvs/pcaudiolib_io > Fred, you are aware that pcaudiolib is GPL? Maybe it is

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-23 Thread fredvs
> Fred, you are aware that pcaudiolib is GPL? Huh, I am not a layer... What is not premised, will I go to jail? > Maybe it is better if you make an independent sound library. Yes, why not. But the code of pcaudiolib is working good. > Maybe the library could be written in Free Pascal. With t

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-23 Thread fredvs
Hello. I did add a topic. https://github.com/rhdunn/pcaudiolib/issues/14 Fre;D -- Sent from: http://mseide-msegui-talk.13964.n8.nabble.com/ -- Check out the vibrant tech community on one of the world's most engaging

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-24 Thread Martin Schreiber
On Friday 23 March 2018 15:44:52 fredvs wrote: > > Fred, you are aware that pcaudiolib is GPL? > > Huh, I am not a layer... > What is not premised, will I go to jail? > Nobody can use it in combination with closed source elements. eSpeakNG library is GPL too. I used it for MSEgui because it is pos

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-24 Thread Martin Schreiber
On Saturday 24 March 2018 08:49:03 Martin Schreiber wrote: > > Nobody can use it in combination with closed source elements. eSpeakNG > library is GPL too. I used it for MSEgui because it is possible to make a > GPL-ed speech server based on it which overcomes the GPL trap for > applications which

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-24 Thread fredvs
> Nobody can use it in combination with closed source elements. Aaargh. OK, I will take the positive of that story: I went deep inside ALSA and Pulseaudio code and no more secret for me about those libs. By the way, if you decide to have your own MSE audio lib, I will test-help it with force. An

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-24 Thread fredvs
Hello Martin. Now that the pcaudiolib trip has ended, if you agree, i will give my sentiments (if not, just do not read what follows). Jonathan Duddington, the creator of eSpeak did choose GPL license for his eSpeak code. I did ask him if he had plan to make it it LGPL, but no, this was not in hi

Re: [MSEide-MSEgui-talk] MSE pcaudio.

2018-03-25 Thread Martin Schreiber
> > My 0,1 cent: Pcaudiolib should rename his license into LGPL. > Agreed. Martin -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___

  1   2   >