Search found 696 matches

by Lena
Sat Oct 24, 2020 3:53 am
Forum: Technical
Topic: [Android]BASS
Replies: 26
Views: 3634

Re: [Android]BASS

I use this code to close the application and stop the service:
MainActivity.finish;
It works.
Do I need any additional steps to stop the service?
by Lena
Sat Oct 24, 2020 3:43 am
Forum: Technical
Topic: Update Progressbar
Replies: 6
Views: 120

Re: Update Progressbar

I tried to use the indicator but I can't see it. procedure TForm1.Button1Click(Sender: TObject);//Play Button usually loading audio stream 2-10 seconds var check :boolean; Len, progress: DWORD; Begin AniIndicator1.Enabled := True;//no effect AniIndicator1.Visible := True; AniIndicator1.Repaint; prog...
by Lena
Fri Oct 23, 2020 6:39 am
Forum: Technical
Topic: Duplicates not allowed
Replies: 9
Views: 247

Re: Duplicates not allowed

Thank you so much for your recommendations!
by Lena
Fri Oct 23, 2020 6:37 am
Forum: Technical
Topic: Update Progressbar
Replies: 6
Views: 120

Re: Update Progressbar

your loop probably should be in a separate worker thread instead, not in the main UI thread. Then that worker thread can post updates to the UI as needed, and let the main UI thread handle painting updates normally. Can you show the structure of the code how it should look? P.S. Maybe so? var aTask...
by Lena
Fri Oct 23, 2020 6:29 am
Forum: Technical
Topic: [Android]BASS
Replies: 26
Views: 3634

Re: [Android]BASS

Next step:
Added a service to a project with BASS. Everything works as it should. For an hour now, the music has been playing when the application is minimized and the screen is locked.
by Lena
Fri Oct 23, 2020 4:15 am
Forum: Technical
Topic: [Android]BASS
Replies: 26
Views: 3634

Re: [Android]BASS

Thank You rlebeau! Now Buil OK. uses System.SysUtils, System.Classes, System.Android.Service, AndroidApi.JNI.GraphicsContentViewText, Androidapi.JNI.Os, Androidapi.JNI.App, Androidapi.JNI.Support, Androidapi.JNI.JavaTypes, Androidapi.Helpers, Androidapi.JNIBridge, Androidapi.Jni; type TDM = class(TA...
by Lena
Wed Oct 21, 2020 10:47 pm
Forum: Technical
Topic: Duplicates not allowed
Replies: 9
Views: 247

Re: Duplicates not allowed

Thank you. TThread.ForceQueue in DoMeta() working. What do you think if I remove TThread.ForceQueue from DoMeta() and put in MetaSync? procedure MetaSync(handle: HSYNC; channel, data: DWORD; user: Pointer); stdcall; begin TThread.ForceQueue(nil, procedure begin DoMeta(); end) end; or is it better to...
by Lena
Wed Oct 21, 2020 4:35 am
Forum: Technical
Topic: Update Progressbar
Replies: 6
Views: 120

Re: Update Progressbar

HsiaLin wrote: Wed Oct 21, 2020 4:07 am try
ProgressBar1.Update();
Hi.
In FMX no method Update for ProgressBar.
by Lena
Wed Oct 21, 2020 3:31 am
Forum: Technical
Topic: Update Progressbar
Replies: 6
Views: 120

Update Progressbar

Hi. I try update value on FMX project but no effect. How is it correct? Thanks. progress := 0; repeat len := BASS_StreamGetFilePosition(str, BASS_FILEPOS_END); if (len = DW_Error) then break; //something's gone wrong! (eg. BASS_Free called) progress := BASS_StreamGetFilePosition(str, BASS_FILEPOS_BU...
by Lena
Tue Oct 20, 2020 2:42 am
Forum: Technical
Topic: [Android]BASS
Replies: 26
Views: 3634

Re: [Android]BASS

Thank you very much I will investigate! P.S. I also found this difficult code. But it does not compile for me. Delphi 10.3.3 Start Foreground service in Delphi 10.3 unit Unit1; interface uses System.SysUtils, System.Classes, System.Android.Service, AndroidApi.JNI.GraphicsContentViewText, Androidapi....
by Lena
Tue Oct 20, 2020 2:22 am
Forum: Technical
Topic: Duplicates not allowed
Replies: 9
Views: 247

Re: Duplicates not allowed

Thank you! Delphi 10.3.3 I also found what UTF8String shows Russian letters. I've tested my new code throughout the day and everything looks good. I hear songs from the audio stream and see their titles Russian and English. My new code with comments below: var Form1: TForm1; smp: HSAMPLE; str: HSTRE...
by Lena
Sun Oct 18, 2020 10:33 am
Forum: Technical
Topic: Duplicates not allowed
Replies: 9
Views: 247

Re: Duplicates not allowed

If the song contains Russian letters in the title, then I see unreadable characters.
Form1.Text1.Text := meta;
Please help fix it.
Delphi 10.3.3
by Lena
Sun Oct 18, 2020 10:29 am
Forum: Technical
Topic: Duplicates not allowed
Replies: 9
Views: 247

Re: Duplicates not allowed

It looks like it works: // uses System.Threading procedure DoMeta(); var meta: MarshaledAString; p: Integer; begin //Form1.Text1.Text := ''; meta := BASS_ChannelGetTags(str, BASS_TAG_META); if (meta <> nil) then begin p := Pos('StreamTitle=', meta); if (p = 0) then begin TTask.Run( procedure begin T...
by Lena
Sun Oct 18, 2020 7:04 am
Forum: Technical
Topic: Duplicates not allowed
Replies: 9
Views: 247

Re: Duplicates not allowed

If commment in DoMeta() lines
Form1.Text1.Text := '';
Form1.Text1.Text := meta;
No Duplicates not allowed on Android. :o
by Lena
Sat Oct 17, 2020 9:46 am
Forum: Technical
Topic: Duplicates not allowed
Replies: 9
Views: 247

Duplicates not allowed

Hi. I am trying to translate an example to the bass library from windows to android. An example is called netradio from delphi windows folder bass library. procedure DoMeta(); var meta: MarshaledAString; p: Integer; begin Form1.Text1.Text := ''; meta := BASS_ChannelGetTags(str, BASS_TAG_META); if (m...