Re: [pulseaudio-discuss] Device GUID like identifier

2010-06-20 Thread Brendon Costa
Thanks for the responses. I will take a look at PA_PROP_DEVICE_SERIAL.

I am implementing a Linux port for an existing API. The API has
existing expected behaviour that comes from these other platforms and
is expected to behave similar on Linux also, thus the need to
implement it like this. As a result I need to provide something like
this GUID as I do not have the option of changing the complete API to
work in the pulse way.

However with that said, one of the devices I will present to the user
(which will be the default for the Linux port) is a special Pulse
Default Audio device. If this device is chosen (which is the default).
Then all this stuff is relegated to Pulse as you mentioned doing
things the pulse way as is usually recommended passing NULL for the
device selection etc. In the case of the GUID, if the user has
selected this default device. I will provide a dummy GUID that I
know means choose the Pulse Default. The idea is simply to by default
do things the pulse way and then allow through the API the choice of
doing things differently.

This API is expected to be used from within games. There is a
requirement to allow the game developer to choose from within the game
what devices to use. A typical use case of this is that if a user of
the game wants to switch the audio device for voice capture or
playback, then they should not have to leave the game in order to
configure the pulse manager to switch devices. They should be able to
do this from a GUI within the game. One size does not always fit all
situations, but I agree that the pulse way of doing things has its
merits and why I plan to make the default option to defer everything
to pulse.

I appreciate that on the whole, although Pulse would like apps to
behave a certain way (and I will try to honour that for the default
case), it does not seem to force the issue.

Thanks,
Brendon.



On 10 June 2010 19:47:52 UTC+10, Lennart Poettering
lenn...@poettering.net wrote:
 On Thu, 10.06.10 15:06, Brendon Costa (brendon.j.co...@gmail.com) wrote:

 heya,

 I am integrating Pulse Audio into a cross platform VoIP API at work.
 We currently allow a user of our API to use a GUID that is simply a
 unique identifier for a audio device to identify a device. Thus they
 can save this to a preferences file for example and on next load of
 the app still be using the same audio device they were using if it is
 available.

 Is there any such source/sink identifier (or combination of
 identifiers) I can use for and be sure it will uniquely identify a
 device across system restarts?

 You should not try to outsmart PA in the choice of devices for you.

 That said, what you are looking for is usually encoded in the
 PA_PROP_DEVICE_SERIAL property of the devices. It is only set if such a
 serial number exists for a device.

 But again, if you want to use this then you are probably doing things
 wrong in the context of PA.

 Lennart

 --
 Lennart Poettering                        Red Hat, Inc.
 lennart [at] poettering [dot] net
 http://0pointer.net/lennart/           GnuPG 0x1A015CC4
 ___
 pulseaudio-discuss mailing list
 pulseaudio-discuss@mail.0pointer.de
 https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss

___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] Device GUID like identifier

2010-06-20 Thread Brendon Costa
I will also look into this. It does seem that the source/sink name
seems good enough. Does anyone know for sure?


On 15 June 2010 04:19:28 UTC+10, Tanu Kaskinen ta...@iki.fi wrote:
 the alsa devices seem to use udev variables that contain the
 serial number, if a serial number is available. bluetooth-discover
 assigns names with the MAC address, e
___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] [PATCH] fix profile configurations for IEC/SPDIF outputs

2010-06-20 Thread pl bossart
 Oh I see you completely removed the a52 plugin support... any reason?
 I'd rather the support was just fixed rather than removed completely.

 My patch should fix the assert, but not sure what the next stage of
 fixing it would be.

 Also your patch seems to use hw: names in the profiles. This is bad.
 any reason why it was changed? If there is a problem using iec958:%f on
 your machine, I'd expect it's an alsa bug. Using hw:%f,1 is almost
 certainly broken.

My patch was deliberately provocative to see if there were any good
reasons why things were the way they are

I find it very strange to encode with a52 and rely on surround40. The
latter duplicates what PulseAudio could do, and the former is a lossy
codec that will decrease the audio quality while increasing the
workload on your computer. You are probably better off sending stereo
and letting your receiver doing the post-processing. If you are using
encoding as a means to work around the limitations of S/PDIF, then
change to HDMI, it'll remove the need for encoding and will give you a
better control on lip-sync.

Also I have two devices on my sound card, one is analog out and the
other is the digital out. Changing the configuration toggles between
the two sinks. I did not want to use the IEC plugin as it entails some
memory copies that are totally unnecessary, it works fine without it
so why bother?
___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss