recfile and playfile over HP iPAQ H5400 with SO Familiar Linux

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Vega,

At least 2 problems here:

1. assertion on PA callback:
pj_assert(frameCount == stream->samples_per_frame * stream->channel_count);

This bug has been fixed (see http://trac.pjsip.org/repos/ticket/504).
And I have tested with NCHANNELS = 2, it works fine.

2. Assertion `component->hostChannelCount > 0' failed
I am not sure about this, please find the similar problem in these
discussions:
http://techweb.rfa.org/pipermail/portaudio/2005-August/004710.html
http://mlblog.osdir.com/audio.portaudio.devel/2005-08/

Currently pjsip is bound to specific revision of PortAudio, so perhaps the
problem
has been fixed on newest version of PortAudio.


nanang


On 06/03/2008, Rodrigo Vega <vegaroy13 at gmail.com> wrote:
>
> Hi:
>
> I'm testing recfile and playfile over an HP iPAQ H5400 with SO Familiar
> Linux:
>
> Normaly, after compiling those programs, I got these outputs:
>
> root at h3900:~/bin# recfile-arm-unknown-linux-gnu file.wav
>  01:22:33.301 os_core_unix.c pjlib 0.8.0-trunk for POSIX initialized
>  01:22:33.327      pasound.c PortAudio sound library initialized, status=0
>  01:22:33.327      pasound.c PortAudio host api count=1
>  01:22:33.328      pasound.c Sound device count=1
>  01:22:33.328          pjlib select() I/O Queue created (0x5846c)
>  01:22:33.334   wav_writer.c File writer 'file.wav' created:
> samp.rate=44100, bufsize=4KB
>  01:22:33.349      pasound.c Opened device /dev/dsp (OSS) for recording,
> sample rate=44100, ch=2, bits=16, 882 samples per frame, latency=11 ms
>  01:22:33.349      pasound.c Starting /dev/dsp stream..
>
> !!!441,882,2
> recfile-arm-unknown-linux-gnu: ../src/pjmedia/pasound.c:94:
> PaRecorderCallback: Assertion `frameCount == stream->samples_per_frame *
> stream->channel_count' failed.
> Aborted
>
> And the     pj_assert(frameCount == stream->samples_per_frame *
> stream->channel_count);
> from pasound.c is not true because:
>
> (441 == 882*2)?... of course not!!!.
>
>
> root at h3900:~/bin# playfile-arm-unknown-linux-gnu ../works.wav
>  01:23:09.557 os_core_unix.c pjlib 0.8.0-trunk for POSIX initialized
>  01:23:09.583      pasound.c PortAudio sound library initialized, status=0
>  01:23:09.583      pasound.c PortAudio host api count=1
>  01:23:09.583      pasound.c Sound device count=1
>  01:23:09.584          pjlib select() I/O Queue created (0x5a494)
>  01:23:09.588   wav_player.c File player '../works.wav' created:
> samp.rate=44100, ch=2, bufsize=4KB, filesize=442KB
>  01:23:09.603      pasound.c Opened device 0: /dev/dsp(OSS) for playing,
> sample rate=44100, ch=2, bits=16, 1764 samples per frame, latency=23 ms
>  01:23:09.605      pasound.c Starting /dev/dsp stream..
>
> !!!882,1764,2
> playfile-arm-unknown-linux-gnu: ../src/pjmedia/pasound.c:145:
> PaPlayerCallback: Assertion `frameCount == stream->samples_per_frame *
> stream->channel_count' failed.
> Aborted
>
>
> What I did after that, is to change in recfile.c:
> #define NCHANNELS>    1
>
> After that, both programs do not abort, but when playing the wav file it
> sounds played at double speed....
>
>
> So, then, I comment the  pj_assert's in pasound.c.
> After compiling again I can use recfile and playfile with no errors, and
> the sound seems to be normal, I can record and play that record properly.
>
> I cannot execute simple_pjsua-arm-unknown-linux-gnu, this is the error:
>
> simple_pjsua-arm-unknown-linux-gnu:
> src/../../../portaudio/src/hostapi/oss/pa_unix_oss.c:1124:
> PaOssStream_Configure: Assertion `component->hostChannelCount > 0' failed.
> Aborted
>
>
>
> and the report from sndinfo is:
> root at h3900:~/bin# sndinfo-arm-unknown-linux-gnu
>  01:49:06.026 os_core_unix.c pjlib 0.8.0-trunk for POSIX initialized
>  01:49:06.051      pasound.c PortAudio sound library initialized, status=0
>  01:49:06.052      pasound.c PortAudio host api count=1
>  01:49:06.055      pasound.c Sound device count=1
>  01:49:06.057          pjlib select() I/O Queue created (0x3d7f4)
> Device #00:
>   Name                : /dev/dsp
>   # of input channels : 2
>   # of output channels: 2
>   Default clock rate  : 44100 Hz
>
> And using the other arguments:
>
> root at h3900:~/bin# sndinfo-arm-unknown-linux-gnu -1 rec 8000 2 16
>  01:54:55.138 os_core_unix.c pjlib 0.8.0-trunk for POSIX initialized
>  01:54:55.167      pasound.c PortAudio sound library initialized, status=0
>  01:54:55.167      pasound.c PortAudio host api count=1
>  01:54:55.167      pasound.c Sound device count=1
>  01:54:55.168          pjlib select() I/O Queue created (0x3d7f4)
> Opening device -1 for capture: clockrate=8000, nchannel=2, bits=16,
> nsamples=160..
>  01:54:55.186      pasound.c Opened device /dev/dsp (OSS) for recording,
> sample rate=8000, ch=2, bits=16, 160 samples per frame, latency=16 ms
>  01:54:55.186      pasound.c Starting /dev/dsp stream..
>  01:54:55.201      pasound.c Recorder thread started
>  01:54:55.201      pasound.c Done, status=0
> Press <ENTER> to stop
>
>  01:54:58.420      pasound.c Closing /dev/dsp: 0 underflow, 0 overflow
> Success.
> Delay:
>
> root at h3900:~/bin# sndinfo-arm-unknown-linux-gnu -1 play 8000 2 16
>  01:52:35.124 os_core_unix.c pjlib 0.8.0-trunk for POSIX initialized
>  01:52:35.154      pasound.c PortAudio sound library initialized, status=0
>  01:52:35.157      pasound.c PortAudio host api count=1
>  01:52:35.160      pasound.c Sound device count=1
>  01:52:35.161          pjlib select() I/O Queue created (0x3d7f4)
> Opening device -1 for playback: clockrate=8000, nchannel=2, bits=16,
> nsamples=160..
>  01:52:35.180      pasound.c Opened device 0: /dev/dsp(OSS) for playing,
> sample rate=8000, ch=2, bits=16, 160 samples per frame, latency=16 ms
>  01:52:35.182      pasound.c Starting /dev/dsp stream..
>  01:52:35.198      pasound.c Player thread started
>  01:52:35.201      pasound.c Done, status=0
> Press <ENTER> to stop
>
>  01:52:38.560      pasound.c Closing /dev/dsp: 0 underflow, 0 overflow
> Success.
> Delay: 0 0 13 0 15 16 0 15 15 0 16 0 15 16 0 15 15 0 16 0 15 16 0 15 15 0
> 16 0 15 16 0 15 15 0 15 0 15 16 0 15 15 0 16 0 15 16 0 15 15 0 16 0 15 16 0
> 15 15 0 16 0 15 16 0 15 15 0 15 0 15 16 0 15 15 0 16 0 15 16 0 15 16 0 15 0
> 15 16 0 15 15 0 16 0 15 16 0 15 16 0 15 0 15 16 0 15 15 0 15 0 15 16 0 15 15
> 0 16 0 15 16 0 15 15 0 16 0 15 16 0 15 15 0 16 0 15 16 0 15 15 0
> Callback interval: min interval=0 ms, max interval=16 ms
>
> root at h3900:~/bin# sndinfo-arm-unknown-linux-gnu -1 both 8000 2 16
>  01:52:44.533 os_core_unix.c pjlib 0.8.0-trunk for POSIX initialized
>  01:52:44.559      pasound.c PortAudio sound library initialized, status=0
>  01:52:44.559      pasound.c PortAudio host api count=1
>  01:52:44.559      pasound.c Sound device count=1
>  01:52:44.562          pjlib select() I/O Queue created (0x3d7f4)
> Opening device -1 for capture/playback: clockrate=8000, nchannel=2,
> bits=16, nsamples=160..
>  01:52:44.582      pasound.c PA message: Expression 'ioctl( component->fd,
> SNDCTL_DSP_SETFRAGMENT, &frgmt )' failed in
> 'src/../../../portaudio/src/hostapi/oss/pa_unix_oss.c', line: 1023
>
> sndinfo-arm-unknown-linux-gnu:
> src/../../../portaudio/src/hostapi/oss/pa_unix_oss.c:1124:
> PaOssStream_Configure: Assertion `component->hostChannelCount > 0' failed.
> Aborted
>
>
> Finaly, Why I can play an rec at the same time?????!!!!!, this is the
> prof:
>
> root at h3900:~/bin# playfile-arm-unknown-linux-gnu ../works.wav
>  01:57:37.243 os_core_unix.c pjlib 0.8.0-trunk for POSIX initialized
>  01:57:37.269      pasound.c PortAudio sound library initialized, status=0
>  01:57:37.269      pasound.c PortAudio host api count=1
>  01:57:37.269      pasound.c Sound device count=1
>  01:57:37.270          pjlib select() I/O Queue created (0x59e74)
>  01:57:37.275   wav_player.c File player '../works.wav' created:
> samp.rate=44100, ch=2, bufsize=4KB, filesize=442KB
>  01:57:37.290      pasound.c Opened device 0: /dev/dsp(OSS) for playing,
> sample rate=44100, ch=2, bits=16, 1764 samples per frame, latency=23 ms
>  01:57:37.291      pasound.c Starting /dev/dsp stream..
>  01:57:37.318      pasound.c Player thread started
>  01:57:37.321      pasound.c Done, status=0
> Playing ../works.wav..
>
> Press <ENTER> to stop playing and quit
>  01:57:39.814   wav_player.c File port ../works.wav EOF, rewinding..
> ^T 01:57:42.333   wav_player.c File port ../works.wav EOF, rewinding..
>  01:57:44.829   wav_player.c File port ../works.wav EOF, rewinding..
>  01:57:47.325   wav_player.c File port ../works.wav EOF, rewinding..
>  01:57:49.798   wav_player.c File port ../works.wav EOF, rewinding..
>  01:57:52.317   wav_player.c File port ../works.wav EOF, rewinding..
>  01:57:54.813   wav_player.c File port ../works.wav EOF, rewinding..
>  01:57:57.309   wav_player.c File port ../works.wav EOF, rewinding..
>  01:57:59.828   wav_player.c File port ../works.wav EOF, rewinding..
>  01:58:02.297   wav_player.c File port ../works.wav EOF, rewinding..
>  01:58:04.807   wav_player.c File port ../works.wav EOF, rewinding..
>  01:58:07.328   wav_player.c File port ../works.wav EOF, rewinding..
>  01:58:09.799   wav_player.c File port ../works.wav EOF, rewinding..
>  01:58:12.318   wav_player.c File port ../works.wav EOF, rewinding..
>
>  01:58:16.500      pasound.c Stopping stream..
>  01:58:16.500      pasound.c Done, status=0
>  01:58:18.500      pasound.c Closing /dev/dsp: 0 underflow, 0 overflow
>  01:58:18.600      pasound.c PortAudio sound library shutting down..
>
> root at h3900:~# bin/recfile-arm-unknown-linux-gnu file.wav
>  01:58:01.958 os_core_unix.c pjlib 0.8.0-trunk for POSIX initialized
>  01:58:01.969      pasound.c PortAudio sound library initialized, status=0
>  01:58:01.970      pasound.c PortAudio host api count=1
>  01:58:01.972      pasound.c Sound device count=1
>  01:58:01.976          pjlib select() I/O Queue created (0x57ec4)
>  01:58:01.984   wav_writer.c File writer 'file.wav' created:
> samp.rate=44100, bufsize=4KB
>  01:58:01.994      pasound.c Opened device /dev/dsp (OSS) for recording,
> sample rate=44100, ch=2, bits=16, 882 samples per frame, latency=11 ms
>  01:58:01.995      pasound.c Starting /dev/dsp stream..
>  01:58:02.011      pasound.c Recorder thread started
>  01:58:02.013      pasound.c Done, status=0
> Recodring file.wav..
>
> Press <ENTER> to stop recording and quit
>
>  01:58:10.650      pasound.c Stopping stream..
>  01:58:10.651      pasound.c Done, status=0
>  01:58:12.650      pasound.c Closing /dev/dsp: 0 underflow, 0 overflow
>  01:58:12.701      pasound.c PortAudio sound library shutting down..
>
> As  you can see, recording was inside the interval of playing another
> file... Why aborts simple_pjsua with the same error in sndinfo in mode
> 'both'????
>
>
> It can be fixed????
> thanks for your comments.
>
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip at lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20080307/612946ae/attachment-0001.html 


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux