Postby djdjdj » 21 Sep 2010 01:45
Hi Olivier, thanks for your reply and update on the program. I recognize you as the author of vlc.py now. Thanks for this great binding.
I haven't been able to use two sound cards yet. I have tried the following so far.
>i=vlc.Instance()
>mp=i.media_player_new()
>m=i.media_new(filename)
>ed=i.audio_output_enumerace_devices()
>ed
[{'name':'waveout', 'devices':[{'id':wavemapper', 'longname':'Microsoft Soundmapper'}, {'id':'USB Audio CODEC ($ffff,$ffff)', 'longname':'USB Audio CODEC ($ffff,$ffff)'}, {'id':'SigmaTel Audio ($1,$64)', 'longname':'SigmaTel Audio ($1,$64)'}], 'description':'Win32 waveOut extension output'},
{'name':'aout_directx', 'devices':[], 'description':'DirectX audio output'},
{'name':'waveout', 'devices':[{'id':wavemapper', 'longname':'Microsoft Soundmapper'}, {'id':'USB Audio CODEC ($ffff,$ffff)', 'longname':'USB Audio CODEC ($ffff,$ffff)'}, {'id':'SigmaTel Audio ($1,$64)', 'longname':'SigmaTel Audio ($1,$64)'}], 'description':'Win32 waveOut extension output'},
{'name':'portaudio', 'devices':[], 'description':'PORTAUDIO audio output'},
{'name':'dummy', 'devices':[], 'description':'Dummy audio output function'},
{'name':'aout_sdl', 'devices':[], 'description':'Simple DirectMedia Layer audio output'},
{'name':'aout_file', 'devices':[], 'description':'File audio output'},
{'name':'aout_directx', 'devices':[], 'description':'DirectX audio output'}]
>mp.play()
(I hear music from my USB sound card, which is "USB Audio CODEC".)
>ed[0]['name']
'waveout'
>ed[0]['devices']
[{'id':wavemapper', 'longname':'Microsoft Soundmapper'}, {'id':'USB Audio CODEC ($ffff,$ffff)', 'longname':'USB Audio CODEC ($ffff,$ffff)'}, {'id':'SigmaTel Audio ($1,$64)', 'longname':'SigmaTel Audio ($1,$64)'}]
(now I try to play through "SigmaTel Audio ($1,$64)", which is the 3rd device of ed[0].
>mp.audio_output_device_set(ed[0]['name'], ed[0]['devices'][2]['id'])
>mp.play()
(I still hear the music through USB Audio CODEC.)
(I even tested the following.)
>mp.audio_output_device_set('aoe', 'aoe')
>mp.play()
(still the music played through USB Audio CODEC.
My plan is to use two media players, one using SimgaTel Audio and the other using USB Audio CODEC. What can I do to achieve this?
Thanks for your help Olivier.