play audio trough Jack audio server using ONLY gambas resources

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

play audio trough Jack audio server using ONLY gambas resources

Federico Allegretti
hello everybody.
Trying to play audio files with GB.MEDIA and his jack audio sink plug in.

I got gb.media returning media informations (like duration), but no
playback after play.

' Gambas class file

Private Player_A As MediaPlayer   'player che gestira' i media con gb.media
(gstreamer)
Private UscitaAudio As MediaControl 'l'area di rendering dei media

......

Public Sub Button3_Click()
  Player_A = New MediaPlayer As "MediaPlayer"
  UscitaAudio = New MediaControl(Player_A, "jackaudiosink")

  Player_A.URL = Media.URL(Label1.Text)
  Player_A.Play

  Timer1.Start

End

......

in patch bay i cannot see the gambas "client" creation nor cable connected,
like i see if i run in the shell this command:

gst-launch audiotestsrc ! jackaudiosink

so i suppose i need a way to create the jack audio client, but cannot
figure out the procedure.

Thanks for the help.

Federico
--
Open TV Architecture project: http://sourceforge.net/projects/otva/

Messagenet VOIP: 5338759

YouTube Channel: v1p3r's lab

VIMEO HD videos: http://www.vimeo.com/user1912745/videos
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|

Re: play audio trough Jack audio server using ONLY gambas resources

Benoît Minisini
Le 27/01/2017 à 14:23, Federico Allegretti a écrit :

> hello everybody.
> Trying to play audio files with GB.MEDIA and his jack audio sink plug in.
>
> I got gb.media returning media informations (like duration), but no
> playback after play.
>
> ' Gambas class file
>
> Private Player_A As MediaPlayer   'player che gestira' i media con gb.media
> (gstreamer)
> Private UscitaAudio As MediaControl 'l'area di rendering dei media
>
> ......
>
> Public Sub Button3_Click()
>   Player_A = New MediaPlayer As "MediaPlayer"
>   UscitaAudio = New MediaControl(Player_A, "jackaudiosink")
>
>   Player_A.URL = Media.URL(Label1.Text)
>   Player_A.Play
>
>   Timer1.Start
>
> End
>
> ......
>
> in patch bay i cannot see the gambas "client" creation nor cable connected,
> like i see if i run in the shell this command:
>
> gst-launch audiotestsrc ! jackaudiosink
>
> so i suppose i need a way to create the jack audio client, but cannot
> figure out the procedure.
>
> Thanks for the help.
>
> Federico
>

I think you must do:

Player_A = New MediaPlayer As "MediaPlayer"
UscitaAudio = New MediaControl(Player_A, "jackaudiosink")

Player_A.Audio.Output = UscitaAudio
Player_A.URL = Media.URL(Label1.Text)
Player_A.Play

Otherwise I don't think that MediaPlayer can guess what you want to do
with your "jackaudiosink" automatically.

--
Benoît Minisini

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user