[pulseaudio-discuss] java sound implementation using pulseaudio - ports
Ioana Ivan
iivan at redhat.com
Thu Aug 28 05:03:42 PDT 2008
Hi Colin,
Port inherits the following method from the Line interface:
void *close*()
Closes the line, indicating that any system resources in use by the line
can be released.
If this operation succeeds, the line is marked closed and a |CLOSE|
event is dispatched
to the line's listeners.
I'm not sure how to release the system resources used by the line, since
I've never allocated them
myself. Would muting the sink/source and sending a CLOSE event be
enough? I don't think
there's any way for someone using the Java API to tell whether the line
is using any system
resources or not.
Thanks,
Ioana
Colin Guthrie wrote:
> Ioana Ivan wrote:
>
>> Thanks, that's what we decided to do.
>>
>> I have a question regarding closing the pulseaudio sinks/source. Should
>> I use pa_context_suspend_sink/source_by_index/name or just mute them?
>> I'm not sure exactly what pa_context_suspend_sink_by_index should do;
>> I've tried using it and it didn't seem to have any effect (i.e. I could
>> still hear the sound).
>>
>
> Not really sure what you mean by "I have a question regarding closing
> the pulseaudio sinks/source." (namely the "closing" bit). Do you mean
> when you are done and want to exit your application? Or do you just mean
> "stop it from outputting sound"?
>
> If the latter, I think mute is better. Suspend is when the devices have
> been asked to be suspended so that another application can use the audio
> hardware (or on a timeout so that pulse does not sit there hogging the
> device!)
>
> e.g. you can run an application that wants direct access to sound h/w via:
>
> shell> $ pasuspender myapp
>
> And it will suspend pulse's access to the device for the duration of the
> applications lifetime.
>
> While I don't know how the Java Ports thing works at all, I'd suspect
> you just want to mute it.
>
> HTHs
>
> Col
>
>
>
>
More information about the pulseaudio-discuss
mailing list