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() #