Search found 709 matches

by Lena
Fri Oct 23, 2020 6:39 am
Forum: Technical
Topic: Duplicates not allowed
Replies: 9
Views: 1100

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: 14
Views: 1775

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: 31
Views: 6075

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: 31
Views: 6075

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: 1100

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: 14
Views: 1775

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: 14
Views: 1775

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: 31
Views: 6075

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: 1100

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: 1100

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: 1100

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: 1100

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: 1100

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...
by Lena
Sat Oct 17, 2020 5:35 am
Forum: Technical
Topic: Implicit string cast from 'AnsiChar' to 'string'
Replies: 3
Views: 539

Implicit string cast from 'AnsiChar' to 'string'

Hi. How to correctly remove warnings in an Android project? function CheckInet: boolean; var aResp: IHTTPResponse; aHTTP: THTTPClient; begin Result := false; aHTTP := THTTPClient.Create; try try aResp := aHTTP.Head('http://google.com'); //Result := aResp.StatusCode < 400; Result := true; except Resu...
by Lena
Fri Oct 09, 2020 4:22 am
Forum: Technical
Topic: [Android]BASS
Replies: 31
Views: 6075

Re: [Android]BASS

Thanks for the additional information! I think the error is also in RAD 10.3.3 1. I create new an Android service 64 bit. 2. I create new app 64 bit. 3. Not use bass. 4. Use this short video: https://www.youtube.com/watch?v=0mD3WLK8FYc function TDM.AndroidServiceStartCommand(const Sender: TObject; c...