[Qnet] I'd like to play a wave file using other machine's so

Hello,

I’d like to play a wave file using other machine’s sound card through Qnet
Networking.
I read “Audio Developer’s Guide” and some API’s help and refereces wave.c
example file.
It seems to use “snd_pcm_open*()” first to start actual playing.

  1. But I don’t know the way to indicate the remote sound card to open.
    The function(snd_pcm_open*()) has only integer value arguments(int card, int
    device), doesn’t it?
    Are there other ways? Please let me know.

  2. And in case of sound cards, I couldn’t find information about Major,
    Minor numbers in /dev.
    I could check the values only with printing integer values(int card, int
    device) returned by “snd_pcm_open_preferred()”. I have no idea about it.

Also I tested “snd_cards_list()” for those numbers but it gave me Memory
fault (core dumped) message.
I inserted some codes around 170 line after variable declarations in main()
of wave.c.
Like below…

int cards[5] = {0, 0, 0, 0, 0};
int *cards_over;
int i;

snd_cards_list(cards, 5, cards_over);
for (i = 0; i < 5; i++)
fprintf(stderr, “cards[%d] = %d\n”, i, cards_);

It might happen in snd_cards_list() because it didn’t return and printed the
message.
I think the usage of API may right. Are there something missed?

How can I get the card and device numbers of sound cards?



Thank you for your help._

I don’t know the audio stuff very well, but may be you can cheat ?

ln -sP /net/remote/dev/snd /dev/snd

And just run player as usual?

-xtang
redcloak <redcloak@rtsolutions.co.kr> wrote in message
news:b7ofge$hsk$1@nntp.qnx.com

Hello,

I’d like to play a wave file using other machine’s sound card through Qnet
Networking.
I read “Audio Developer’s Guide” and some API’s help and refereces wave.c
example file.
It seems to use “snd_pcm_open*()” first to start actual playing.

  1. But I don’t know the way to indicate the remote sound card to open.
    The function(snd_pcm_open*()) has only integer value arguments(int card,
    int
    device), doesn’t it?
    Are there other ways? Please let me know.

  2. And in case of sound cards, I couldn’t find information about Major,
    Minor numbers in /dev.
    I could check the values only with printing integer values(int card, int
    device) returned by “snd_pcm_open_preferred()”. I have no idea about it.

Also I tested “snd_cards_list()” for those numbers but it gave me Memory
fault (core dumped) message.
I inserted some codes around 170 line after variable declarations in
main()
of wave.c.
Like below…

int cards[5] = {0, 0, 0, 0, 0};
int *cards_over;
int i;

snd_cards_list(cards, 5, cards_over);
for (i = 0; i < 5; i++)
fprintf(stderr, “cards[%d] = %d\n”, i, cards> );

It might happen in snd_cards_list() because it didn’t return and printed
the
message.
I think the usage of API may right. Are there something missed?

How can I get the card and device numbers of sound cards?



Thank you for your help.

Hypothetically it might work, but practically it probably won’t. And even if
it will, it would mean essentially ‘streaming’ audio over network, so you’re
subject to usual issues with streaming. The remote io-audio won’t do any
specific buffering for this purpose…

“Xiaodan Tang” <xtang@qnx.com> wrote in message
news:b7pdae$5ll$1@nntp.qnx.com

I don’t know the audio stuff very well, but may be you can cheat ?

ln -sP /net/remote/dev/snd /dev/snd

And just run player as usual?

-xtang
redcloak <> redcloak@rtsolutions.co.kr> > wrote in message
news:b7ofge$hsk$> 1@nntp.qnx.com> …
Hello,

I’d like to play a wave file using other machine’s sound card through
Qnet
Networking.
I read “Audio Developer’s Guide” and some API’s help and refereces
wave.c
example file.
It seems to use “snd_pcm_open*()” first to start actual playing.

  1. But I don’t know the way to indicate the remote sound card to open.
    The function(snd_pcm_open*()) has only integer value arguments(int card,
    int
    device), doesn’t it?
    Are there other ways? Please let me know.

  2. And in case of sound cards, I couldn’t find information about Major,
    Minor numbers in /dev.
    I could check the values only with printing integer values(int card, int
    device) returned by “snd_pcm_open_preferred()”. I have no idea about it.

Also I tested “snd_cards_list()” for those numbers but it gave me Memory
fault (core dumped) message.
I inserted some codes around 170 line after variable declarations in
main()
of wave.c.
Like below…

int cards[5] = {0, 0, 0, 0, 0};
int *cards_over;
int i;

snd_cards_list(cards, 5, cards_over);
for (i = 0; i < 5; i++)
fprintf(stderr, “cards[%d] = %d\n”, i, cards> );

It might happen in snd_cards_list() because it didn’t return and printed
the
message.
I think the usage of API may right. Are there something missed?

How can I get the card and device numbers of sound cards?



Thank you for your help.


\

Igor Kovalenko <kovalenko@attbi.com> wrote:

Hypothetically it might work, but practically it probably won’t. And even if
it will, it would mean essentially ‘streaming’ audio over network, so you’re
subject to usual issues with streaming. The remote io-audio won’t do any
specific buffering for this purpose…

Actually, it works very well. I do this over 802.11b to my ipaq all the time.

chris


Chris McKillop <cdm@qnx.com> “The faster I go, the behinder I get.”
Software Engineer, QSSL – Lewis Carroll –
http://qnx.wox.org/