Administrator
|
Did you fix the "GTK2" bug or did you switch to Qt?
There is a new release of swp with opus format for Linux 64/32 and Windows 32. https://github.com/fredvs/swp/releases |
This is a GTK2 Bug as you say . What i did is that i disabled the clock loosing ICY then the bug dissapears (I tested it like this with opus for several hours) .
The solution is to remove the clock and add the function into a thread with Synchronize functions to update the ICY . The same happened to me with beatflow when i checked the status on one player to start the second one If you do this PlayFunction1 CheckDuration CanStart2 Main PlayFunction1 while CanStart2 PLayFunction2 This caused problems on the while infinite loop (same as the clock loop) If the Loop is placed in a thread there is no problem In my example PlayFunction1 CheckDuration CanStart2 Thread PlayFunction1 while CanStart2 PLayFunction2 Main Thread.Execute |
Administrator
|
Hum, strange because in uos icy call-live tag is enabled only for mp3, aac and opus dont have that feature.
So for opus files it is not called. Also the simplewebplayer uos demo was updated. Did you use the last uos commits and simplewebplayer demo? |
Administrator
|
In the simpleweblayer demo, after uos_play(), icy tag is only checked once for aac and opus (to get the icy tag from the header), the timer is only for mp3 to check the "live icy tags".
uos_Play(PlayerIndex1); // everything is ready, here we are, lets play it... application.ProcessMessages; if aboolicy then begin if uaudiotype = 0 then timer1.Enabled := True else ontimericytag(nil); end; |
Administrator
|
This post was updated on .
But you are right, better to use the loop-procedure to synchronize all the uos stuffs, like get icy and not a timer that could not be synchronized..
In the case of my swp project, I will use a independent thread to draw the picture in the loop for synchro. [EDIT] I have updated the uos examples simplewebplayer and conswebstream. |
This post was updated on .
sorry for the late rensponses i admire your support . I will check the updates tomorrow .
I am setting up the website here and i do not have time https://www.trustfm.net/software/utilities/BeatFlowPlayer.php but i am finishing ... Later here is the project GTK2 with no problem on opus https://trim.uk.to/ogg-radio-listenver3.zip here is the function that DOES NOT have the pop up problem of the GTK2 at least on my pc with opus procedure TForm1.ListenAudioFromURL(); var samformat, audioformat: shortint; sizebuff: integer; aboolicy:boolean; begin lerror.Caption := ''; label2.Caption := ''; PlayerIndexAudioStreamer := 0; sizebuff := 8192; aboolicy := false; audioformat := -1; // auto-find if radiobutton1.Checked = True then samformat := 0; if radiobutton2.Checked = True then samformat := 1; if radiobutton3.Checked = True then samformat := 2; uos_CreatePlayer(PlayerIndexAudioStreamer); // Create the player. // PlayerIndex : from 0 to what your computer can do ! // If PlayerIndex exists already, it will be overwriten... InIndexAudioStreamer := uos_AddFromURL(PlayerIndexAudioStreamer, PChar(EditURL.Text), -1, samformat, sizebuff, audioformat, aboolicy); // Add a Input from Audio URL with custom parameters // URL : URL of audio file (like 'http://someserver/somesound.mp3') // OutputIndex : OutputIndex of existing Output // -1: all output, -2: no output, other LongInt : existing Output // SampleFormat : -1 default : Int16 (0: Float32, 1:Int32, 2:Int16) // FramesCount : default : -1 (1024) // AudioFormat : default : -1 (auto-find) (0: mp3, 1: opus, 2: aac) // ICY data on/off // example : InputIndex := AddFromFile(0,'http://someserver/somesound.mp3',-1,-1,-1); // result : -1 nothing created, otherwise Input Index in array if InIndexAudioStreamer <> -1 then begin radiogroup1.Enabled := False; OutIndexAudioStreamer := uos_AddIntoDevOut(PlayerIndexAudioStreamer, -1, -1, uos_InputGetSampleRate(PlayerIndexAudioStreamer, InIndexAudioStreamer), uos_InputGetChannels(PlayerIndexAudioStreamer, InIndexAudioStreamer), samformat, sizebuff, -1); // add a Output into device with custom parameters // PlayerIndex : Index of a existing Player // Device ( -1 is default Output device ) // Latency ( -1 is latency suggested ) ) // SampleRate : delault : -1 (44100) // here default samplerate of input // Channels : delault : -1 (2:stereo) (0: no channels, 1:mono, 2:stereo, ...) // SampleFormat : -1 default : Int16 : (0: Float32, 1:Int32, 2:Int16) // FramesCount : default : -1 (65536) // ChunkCount : default : -1 (= 512) // result : -1 nothing created, otherwise Output Index in array uos_OutputSetLevelEnable(PlayerIndexAudioStreamer, OutIndexAudioStreamer, 2); // set calculation of level/volume (usefull for showvolume procedure) // set level calculation (default is 0) // 0 => no calcul // 1 => calcul before all DSP procedures. // 2 => calcul after all DSP procedures. // 3 => calcul before and after all DSP procedures. uos_LoopProcIn(PlayerIndexAudioStreamer, InIndexAudioStreamer, @LoopProcPlayerAudioStreamer); // Assign the procedure of object to execute inside the loop for a Input // PlayerIndex : Index of a existing Player // InIndex : Index of a existing Input // LoopProcPlayer1 : procedure of object to execute inside the loop uos_OutputAddDSPVolume(PlayerIndexAudioStreamer, OutIndexAudioStreamer, 1, 1); // DSP Volume changer // PlayerIndex1 : Index of a existing Player // In1Index : InputIndex of a existing input // VolLeft : Left volume ( from 0 to 1 => gain > 1 ) // VolRight : Right volume uos_OutputSetDSPVolume(PlayerIndexAudioStreamer, OutIndexAudioStreamer, TrackBarVolL.position / 100, TrackBarVolR.position / 100, True); // Set volume // PlayerIndex1 : Index of a existing Player // In1Index : InputIndex of a existing Input // VolLeft : Left volume // VolRight : Right volume // Enable : Enabled // procedure to execute when stream is terminated uos_EndProc(PlayerIndexAudioStreamer, @ClosePlayerAudioStreamer); // Assign the procedure of object to execute at end // PlayerIndex : Index of a existing Player // ClosePlayer1 : procedure of object to execute inside the loop ButtonPlay.Enabled := False; ButtonResume.Enabled := False; ButtonStop.Enabled := True; ButtonPause.Enabled := True; //application.ProcessMessages; //sleep(1000); uos_Play(PlayerIndexAudioStreamer); // everything is ready, here we are, lets play it... //application.ProcessMessages; if aboolicy then begin //timer1.Enabled := True; end; end else lerror.Caption := 'URL did not accessed'; end; Clock is removed Check if this demo with GTK2 gives you problems The pop up issue appeared to me at most within 1st minute The demo does other stuff too ... just concentrate at the the FormActivate and PLAY button events only |
Free forum by Nabble | Edit this page |