[MSEide-MSEgui-talk] MSE pcaudio.

classic Classic list List threaded Threaded
112 messages Options
1234 ... 6
Reply | Threaded
Open this post in threaded view
|

[MSEide-MSEgui-talk] MSE pcaudio.

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 library.

So, it is a **excellent** news that Martin forks this interesting part of
espeak-ng and updated the code to make Pcaudio works even on old Windows
machines.

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).

OK, the presentation are done, time to questions:

In your Pascal wrapper, I do not see the "create_audio_device_object(device,
application_name, description: PChar)" method.
Is it wanted ? (By the way, I did not found any usage of the
"application_name" and "description" parameters in espeak-ng code).

I did not test the Windows pcaudio.dll yet, I will give my result asap.

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 sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mseide-msegui-talk mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
mse
Reply | Threaded
Open this post in threaded view
|

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

mse
Administrator
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://gitlab.com/mseide-msegui/mseuniverse/blob/master/samples/audio/pcaudio/msepcaudio.pas
>
> In your Pascal wrapper, I do not see the
> "create_audio_device_object(device, application_name, description: PChar)"
> method.

It is in msepcaudio.pas:115.
I used the same order as in audio.h.

> Is it wanted ? (By the way, I did not found any usage of the
> "application_name" and "description" parameters in espeak-ng code).
>
It is used in PulseAudio.

Martin

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mseide-msegui-talk mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
Reply | Threaded
Open this post in threaded view
|

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

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'll try to make a separate pcaudiolib.dll.
> Done,
> https://sourceforge.net/projects/mseuniverse/files/eSpeakNG/

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).

Some question...

Do you have a idea what are audio_object_drain() and audio_object_flush()
for ?

Some wishes...

Implementation of input-devices too.

;-)

Bravo and thanks.

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 sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mseide-msegui-talk mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
mse
Reply | Threaded
Open this post in threaded view
|

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

mse
Administrator
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_object_format format,
                 uint32_t rate,
                 uint8_t channels,
                 WAVEFORMATEX **wfmt)
{
        if (!wfmt)
                return E_INVALIDARG;

        switch (format)
        {
        case AUDIO_OBJECT_FORMAT_ALAW:      return
CreateWaveFormatEx(WAVE_FORMAT_ALAW, 8, rate, channels, wfmt);
        case AUDIO_OBJECT_FORMAT_ULAW:      return
CreateWaveFormatEx(WAVE_FORMAT_MULAW, 8, rate, channels, wfmt);
        case AUDIO_OBJECT_FORMAT_S8:        return
CreateWaveFormatEx(WAVE_FORMAT_PCM, 8, rate, channels, wfmt);
        case AUDIO_OBJECT_FORMAT_S16LE:     return
CreateWaveFormatEx(WAVE_FORMAT_PCM, 16, rate, channels, wfmt);
        case AUDIO_OBJECT_FORMAT_S32LE:     return
CreateWaveFormatEx(WAVE_FORMAT_PCM, 32, rate, channels, wfmt);
        case AUDIO_OBJECT_FORMAT_FLOAT32LE: return
CreateWaveFormatEx(WAVE_FORMAT_IEEE_FLOAT, 32, rate, channels, wfmt);
        case AUDIO_OBJECT_FORMAT_FLOAT64LE: return
CreateWaveFormatEx(WAVE_FORMAT_IEEE_FLOAT, 64, rate, channels, wfmt);
        default:                            return E_INVALIDARG;
        }
}
"
It probably depends on the soundcard/driver which formats are supported.

> Some question...
>
> Do you have a idea what are audio_object_drain()

Waits until written audio data has been played.

> and audio_object_flush()

Cancels all buffered audio data.

Martin

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mseide-msegui-talk mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
Reply | Threaded
Open this post in threaded view
|

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

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.

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 sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mseide-msegui-talk mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
Reply | Threaded
Open this post in threaded view
|

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

fredvs
In reply to this post by mse
> 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 get good result with last
parameter of audio_object_write(),

in Unix: number of bytes div channels.
in Windows: number of bytes.

audio_object_write(audioobj, pointer(ps), arlen*sizeof(ps[0]) {$IFDEF unix}
div channels {$endif});

https://github.com/fredvs/pcaudiolib_pas/blob/master/src/pcaudiosynth.pas

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 sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mseide-msegui-talk mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
mse
Reply | Threaded
Open this post in threaded view
|

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

mse
Administrator


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://gitlab.com/mseide-msegui/mseuniverse/tree/master/samples/audio/pcaudio

Martin

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mseide-msegui-talk mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
Reply | Threaded
Open this post in threaded view
|

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

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-demo crash
after enabled/disabled "Sound on" more than 2 times with error message:
"SIGSEV Segmentation fault function ??

Stacks:
#0  00000035 :0 ??()
#1  F407A080 :0 ??()
#2  F407E40E :0 ??()
#3  F40BBA25 :0 ??()
#4  F431EB02 alsa.c:201 alsa_object_write(object=0xb4c0a0,
data=0x7ffff3fed060, bytes=<optimized out>)
#5  00460FBC main.pas:164 WAVEEXE(this=0x7ffff7f96dd0,
SENDER=0x7ffff7ec31c0)
#6  00525CE7 msethreadcomp.pas:135 THREADPROC(this=0x7ffff7ec31c0,
SENDER=0x7ffff7ec22c0)
#7  00507562 msethread.pas:333 INTERNALTHREADPROC(this=0x7ffff7ec22c0)
#8  0053D73A msesysintf.pas:802 THREADEXEC(INFOPO=0x7ffff7ec22c8)
#9  0042B615 :0 CTHREADS_$$_THREADMAIN$POINTER$$POINTER()
#10  0053D6E0 :0 ??()
#11  F7EC22C8 :0 ??()
#12  00400000 :0 ??()
#13  000004C8 :0 ??()
#14  00000000 :0 ??()

Threads:
#0  3295 unknown "threaded-ml" 0x00007ffff1d44840 in ?? () from
/usr/lib/x86_64-linux-gnu/alsa-lib/libasound_module_pcm_pulse.so
#1  3294 unknown "pcaudio" 0x0000000000000035 in ?? ()
#2  3285 unknown "pcaudio" pthread_cond_wait@@GLIBC_2.3.2 () at
../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:143

Also, when clicking on "2channels", "1channel" is still checked and this
produce bad sound.

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 sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mseide-msegui-talk mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
mse
Reply | Threaded
Open this post in threaded view
|

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

mse
Administrator
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 my (maybe corrupted) Linux Mint 17 64 bit system, mse-pcaudio-demo crash
> after enabled/disabled "Sound on" more than 2 times with error message:
> "SIGSEV Segmentation fault function ??
>
> Stacks:
> #0  00000035 :0 ??()
> #1  F407A080 :0 ??()
> #2  F407E40E :0 ??()
> #3  F40BBA25 :0 ??()
> #4  F431EB02 alsa.c:201 alsa_object_write(object=0xb4c0a0,
> data=0x7ffff3fed060, bytes=<optimized out>)

"alsa" pcaudiolib afaik is buggy. Don't you have "pulseaudio" installed?

Martin

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mseide-msegui-talk mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
Reply | Threaded
Open this post in threaded view
|

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

fredvs
> "alsa" pcaudiolib afaik is buggy.
Grrrrrr.

> Don't you have "pulseaudio" installed?
Yes, but it seems that pcaudiolib wants something more at compilation.
Something like pulseaudio-dev (Grrrrr x2).

And I would prefer a "pure" audio-library that can deal with root
sound-drivers, like alsa or oss.
But, ok, I will re-compile pcaudiolib with pulseaudio-dev installed.

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 sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mseide-msegui-talk mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
Reply | Threaded
Open this post in threaded view
|

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

fredvs
In reply to this post by mse
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: #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 F1D4435A :0 ??() #6 F40BB4A2 :0 ??() #7 F4079EE5 :0 snd_pcm_close() #8 F431EA42 alsa.c:143 alsa_object_close(object=0xb4c9b0) #9 F431EBBD alsa.c:180 alsa_object_flush(object=0xb4c9b0) #10 00461548 main.pas:215 SOUNDOFF(this=0x7ffff7f96dd0) #11 0046183D main.pas:256 ONSETEV(this=0x7ffff7f96dd0, SENDER=0x7ffff7f9d790, AVALUE=false, ACCEPT=true) #12 00631D65 msegraphedits.pas:2807 INTERNALCHECKVALUE(this=0x7ffff7f9d790, AVALUE=0, ACCEPT=true) #13 0062F71D msegraphedits.pas:1888 DOCHECKVALUE(this=0x7ffff7f9d790, AVALUE=0, QUIET=false) #14 00631E17 msegraphedits.pas:2826 TOGGLEVALUE(this=0x7ffff7f9d790, AREADONLY=false, DOWN=false) #15 006313C5 msegraphedits.pas:2573 MOUSEEVENT(this=0x7ffff7f9d790, INFO={EVENTKIND = EK_BUTTONRELEASE, SHIFTSTATE = 0, POS = {X = 28, Y = 10}, EVENTSTATE = 0, TIMESTAMP = 397252704, SERIAL = 82, BUTTON = MB_LEFT}) #16 004525E0 msegui.pas:16858 DISPATCHMOUSEEVENT(this=0x7ffff7ee2300, INFO={MOUSE = {EVENTKIND = EK_BUTTONRELEASE, SHIFTSTATE = 0, POS = {X = 28, Y = 10}, EVENTSTATE = 0, TIMESTAMP = 397252704, SERIAL = 82, BUTTON = MB_LEFT}, WHEEL = {EVENTKIND = EK_BUTTONRELEASE, SHIFTSTATE = 0, POS = {X = 28, Y = 10}, EVENTSTATE = 0, TIMESTAMP = 397252704, SERIAL = 82, WHEEL = MW_UP, DELTA = 0}}, CAPTURE=0x7ffff7f9d790) #17 00457C3C msegui.pas:18732 PROCESSMOUSEEVENT(this=0x7ffff7f90550, EVENT=0x7ffff7f85e80) #18 0045A2C4 msegui.pas:19741 EVENTLOOP(this=0x7ffff7f90550, ONCE=false) #19 0045BF70 msegui.pas:20455 DOEVENTLOOP(this=0x7ffff7f90550, ONCE=false) #20 004F0963 mseapplication.pas:1738 RUN(this=0x7ffff7f90550) #21 004057E6 pcaudio.pas:11 main() Threads: #0 7759 unknown "pcaudio" #1 7753 *active* "pcaudio" 0x00007ffff70e8c37 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 Fre;D

Sent from the mseide-msegui-talk mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mseide-msegui-talk mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
Reply | Threaded
Open this post in threaded view
|

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

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, after 2xclick on "Sound on" : crash with
error message: SIGABORT...

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()
#4  F1D45165 :0 pulse_free()
#5  F1D4435A :0 ??()
#6  F40BB4A2 :0 ??()
#7  F4079EE5 :0 snd_pcm_close()
#8  F431EA42 alsa.c:143 alsa_object_close(object=0xb4c9b0)
#9  F431EBBD alsa.c:180 alsa_object_flush(object=0xb4c9b0)
#10  00461548 main.pas:215 SOUNDOFF(this=0x7ffff7f96dd0)
#11  0046183D main.pas:256 ONSETEV(this=0x7ffff7f96dd0,
SENDER=0x7ffff7f9d790, AVALUE=false, ACCEPT=true)
#12  00631D65 msegraphedits.pas:2807 INTERNALCHECKVALUE(this=0x7ffff7f9d790,
AVALUE=0, ACCEPT=true)
#13  0062F71D msegraphedits.pas:1888 DOCHECKVALUE(this=0x7ffff7f9d790,
AVALUE=0, QUIET=false)
#14  00631E17 msegraphedits.pas:2826 TOGGLEVALUE(this=0x7ffff7f9d790,
AREADONLY=false, DOWN=false)
#15  006313C5 msegraphedits.pas:2573 MOUSEEVENT(this=0x7ffff7f9d790,
INFO={EVENTKIND = EK_BUTTONRELEASE, SHIFTSTATE = 0, POS = {X = 28, Y = 10},
EVENTSTATE = 0, TIMESTAMP = 397252704, SERIAL = 82, BUTTON = MB_LEFT})
#16  004525E0 msegui.pas:16858 DISPATCHMOUSEEVENT(this=0x7ffff7ee2300,
INFO={MOUSE = {EVENTKIND = EK_BUTTONRELEASE, SHIFTSTATE = 0, POS = {X = 28,
Y = 10}, EVENTSTATE = 0, TIMESTAMP = 397252704, SERIAL = 82, BUTTON =
MB_LEFT}, WHEEL = {EVENTKIND = EK_BUTTONRELEASE, SHIFTSTATE = 0, POS = {X =
28, Y = 10}, EVENTSTATE = 0, TIMESTAMP = 397252704, SERIAL = 82, WHEEL =
MW_UP, DELTA = 0}}, CAPTURE=0x7ffff7f9d790)
#17  00457C3C msegui.pas:18732 PROCESSMOUSEEVENT(this=0x7ffff7f90550,
EVENT=0x7ffff7f85e80)
#18  0045A2C4 msegui.pas:19741 EVENTLOOP(this=0x7ffff7f90550, ONCE=false)
#19  0045BF70 msegui.pas:20455 DOEVENTLOOP(this=0x7ffff7f90550, ONCE=false)
#20  004F0963 mseapplication.pas:1738 RUN(this=0x7ffff7f90550)
#21  004057E6 pcaudio.pas:11 main()

Threads:
#0  7759 unknown "pcaudio" <function called from gdb>
#1  7753 *active* "pcaudio" 0x00007ffff70e8c37 in __GI_raise
(sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56

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 sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mseide-msegui-talk mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
mse
Reply | Threaded
Open this post in threaded view
|

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

mse
Administrator
In reply to this post by fredvs
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 "Sound on" : crash with error message:
> SIGABORT...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()#4  F1D45165 :0 pulse_free()#5  F1D4435A :0
>
> ??()#6  F40BB4A2 :0 ??()#7  F4079EE5 :0 snd_pcm_close()#8  F431EA42
> alsa.c:143 alsa_object_close(object=0xb4c9b0)#9  F431EBBD alsa.c:180
> alsa_object_flush(object=0xb4c9b0)#10  00461548 main.pas:215

Still looks like alsa to me.
libpcaudio.so.0 binaries are here:
https://sourceforge.net/projects/mseuniverse/files/eSpeakNG/

Martin

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mseide-msegui-talk mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
Reply | Threaded
Open this post in threaded view
|

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

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 2xclick on "Sound ON", crash with this:

#0  F4078E9A :0 snd_pcm_poll_descriptors_revents()
#1  F407A080 :0 ??()
#2  F407E40E :0 ??()
#3  F40BBA25 :0 ??()
#4  F431EB02 alsa.c:201 alsa_object_write(object=0xb4d8c0,
data=0x7ffff3fed060, bytes=<optimized out>)
#5  00460FBC main.pas:164 WAVEEXE(this=0x7ffff7f96dd0,
SENDER=0x7ffff7ec31c0)
#6  00525CE7 msethreadcomp.pas:135 THREADPROC(this=0x7ffff7ec31c0,
SENDER=0x7ffff7ec22c0)
#7  00507562 msethread.pas:333 INTERNALTHREADPROC(this=0x7ffff7ec22c0)
#8  0053D73A msesysintf.pas:802 THREADEXEC(INFOPO=0x7ffff7ec22c8)
#9  0042B615 :0 CTHREADS_$$_THREADMAIN$POINTER$$POINTER()
#10  0053D6E0 :0 ??()
#11  F7EC22C8 :0 ??()
#12  00400000 :0 ??()
#13  000004C8 :0 ??()
#14  00000000 :0 ??()

Threads:
#0  8199 unknown "threaded-ml" 0x00007ffff7bcb34d in write () at
../sysdeps/unix/syscall-template.S:81
#1  8198 unknown "pcaudio" 0x00007ffff4078e9a in
snd_pcm_poll_descriptors_revents () from
/usr/lib/x86_64-linux-gnu/libasound.so.2
#2  8191 unknown "pcaudio" pthread_cond_wait@@GLIBC_2.3.2 () at
../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:143


PS: AFAIK, PulseAudio does use ALSA.

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 sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mseide-msegui-talk mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
mse
Reply | Threaded
Open this post in threaded view
|

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

mse
Administrator
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  F1D4435A :0 ??()
#6  F40BB4A2 :0 ??()
#7  F4079EE5 :0 snd_pcm_close()
#8  F431EA42 alsa.c:143 alsa_object_close(object=0xb4c9b0)
#9  F431EBBD alsa.c:180 alsa_object_flush(object=0xb4c9b0)
"
shows that pcaudiolib does not use the Pulseaudio driver but the Alsa driver.
You probably need to use your self compiled libpcaudio.so.0 with debug info
and step into
"
procedure tmainfo.onsetev(const sender: TObject; var avalue: Boolean;
               var accept: Boolean);
var
 i1: cint;
 channels: int32;
begin
 if avalue <> oned.value then begin
  if avalue then begin
   initializepcaudio([libnameed.sysvalue]);
   faudioobj:= create_audio_device_object(nil,pchar(''),pchar(''));<<<<---here
//   faudioobj:= create_audio_device_object(nil,nil,nil);
                                   //does not load pulseaudio
"
in order to check why it does not pick up pulseaudio on your system.

Martin

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mseide-msegui-talk mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
Reply | Threaded
Open this post in threaded view
|

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

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:

// twochannel:= ch1on.value and ch2on.value;
   twochannel:= true; // force 2 channels.
   channels:= 2; // force 2 channels.

-----> Sound intermited (like with my code).

But adding this in tmainfo.waveexe() line 168:

i1:= audio_object_write(faudioobj,p1,bytelen div channels);

----> Sound perfect.

;-)

About the crash, ok, I will investigate.
(But my nose say it is not a pcaudiolib problem) ...

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 sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mseide-msegui-talk mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
mse
Reply | Threaded
Open this post in threaded view
|

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

mse
Administrator
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 vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mseide-msegui-talk mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
Reply | Threaded
Open this post in threaded view
|

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

fredvs
In reply to this post by 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 begin

------> Solves everything, no more crash after lot of  check/uncheck "Sound
ON".

;-)

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 sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mseide-msegui-talk mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
mse
Reply | Threaded
Open this post in threaded view
|

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

mse
Administrator
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);              // Adding this.
>
>   if faudioobj <> nil then begin
>
> ------> Solves everything, no more crash after lot of  check/uncheck "Sound
> ON".
>
Is this a workaround or a bug fix?

Martin

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mseide-msegui-talk mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
Reply | Threaded
Open this post in threaded view
|

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

fredvs
In reply to this post by mse
> As you like. ;-)

Huh, you do not trust me ?

main.zip <http://mseide-msegui-talk.13964.n8.nabble.com/file/t2/main.zip>  



--
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 sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mseide-msegui-talk mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
1234 ... 6