Search found 1716 matches

by rlebeau
Mon Oct 26, 2020 11:10 am
Forum: Technical
Topic: Update Progressbar
Replies: 6
Views: 121

Re: Update Progressbar

Lena wrote: Sat Oct 24, 2020 3:43 am I tried to use the indicator but I can't see it.
What is in your "other code" exactly? If you are doing everything in the OnClick handler, blocking the main UI message loop, then it makes sense why the Indicator doesn't show anything. DO NOT block the main UI thread!
by rlebeau
Fri Oct 23, 2020 1:14 pm
Forum: Technical
Topic: Text Color in TStringGrid
Replies: 4
Views: 112

Re: Text Color in TStringGrid

If the event is not giving you correct TRect coordinates, then that is a bug in the Grid itself. Do you have the same problem if you use the grid's CellRect() method? Regarding the rest of the code, I see a few issues: When ARow is >= 2, you need to use the "||" LOGICAL OR operator instead of the "|...
by rlebeau
Thu Oct 22, 2020 2:16 pm
Forum: Technical
Topic: Update Progressbar
Replies: 6
Views: 121

Re: Update Progressbar

Using Repaint() should have worked. That being said, 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.
by rlebeau
Thu Oct 22, 2020 2:15 pm
Forum: Technical
Topic: Use of TZCompressionStream
Replies: 3
Views: 79

Re: Use of TZCompressionStream

I have tried the coding sample which is described in the titled "ZLibCompressDecompress (C++)" in help as follows. But I faced compile errors. Such as? Which errors exactly, on which lines? Then I tried several times with modifying some of the above list because I noticed the parameter "zcDefault" ...
by rlebeau
Thu Oct 22, 2020 2:09 pm
Forum: Technical
Topic: Text Color in TStringGrid
Replies: 4
Views: 112

Re: Text Color in TStringGrid

I asked this question on Stack Overflow and got no responses Link? I don't recall seeing a question like this. The following code worked perfectly in Borland C++ Ver 5, on an old App for about 15 years, but since recompiling the App in C++ Rad Studio (Embarcadero), it has absolutely no effect in in...
by rlebeau
Thu Oct 22, 2020 10:39 am
Forum: Technical
Topic: Duplicates not allowed
Replies: 9
Views: 250

Re: Duplicates not allowed

What do you think if I remove TThread.ForceQueue from DoMeta() and put in MetaSync? That would cause the entire DoMeta() to execute at some indeterminate future time after MetaSync() has exited. I would suggest calling BASS_ChannelGetTags() directly in the context of MetaSync() so it gets called as...
by rlebeau
Thu Oct 22, 2020 10:33 am
Forum: Technical
Topic: [Android]BASS
Replies: 26
Views: 3637

Re: [Android]BASS

// can't ref .O on earlier phones, must hardcode if TJBuild_VERSION.JavaClass.SDK_INT > 26 then // JBuild_VERSION_CODES.JavaClass.O begin {$ifdef VER330} Since that 'begin' follows a comment, it should be on the next line: // can't ref .O on earlier phones, must hardcode if TJBuild_VERSION.JavaClas...
by rlebeau
Wed Oct 21, 2020 11:22 am
Forum: Technical
Topic: Duplicates not allowed
Replies: 9
Views: 250

Re: Duplicates not allowed

p := Pos('StreamTitle=', meta); [DCC Warning] UnitMain.pas(96): W1057 Implicit string cast from 'AnsiChar' to 'string' raw := Copy(meta, Pos('=', meta)+2, Pos(';',meta)-Pos('=', meta)-3); [DCC Warning] UnitMain.pas(113): W1057 Implicit string cast from 'AnsiChar' to 'string' <--- Four times + [DCC ...
by rlebeau
Mon Oct 19, 2020 10:37 am
Forum: Technical
Topic: Duplicates not allowed
Replies: 9
Views: 250

Re: Duplicates not allowed

BASS_ChannelGetTags() returns 8bit data. You need to convert that to Unicode before you process it. See my reply to your other post on that issue.
by rlebeau
Mon Oct 19, 2020 10:12 am
Forum: Technical
Topic: Implicit string cast from 'AnsiChar' to 'string'
Replies: 1
Views: 91

Re: Implicit string cast from 'AnsiChar' to 'string'

BASS_ChannelGetTags() returns a null-terminated "const char*" pointer to 8bit character data, which would be PAnsiChar in Delphi (though you are using MarshaledAString for that on Android). You are implicitly converting that pointer as-is to UnicodeString when passing it to System.Pos(), System.Copy...
by rlebeau
Fri Oct 09, 2020 7:18 pm
Forum: Technical
Topic: [Android]BASS
Replies: 26
Views: 3637

Re: [Android]BASS

Lena wrote: Fri Oct 09, 2020 4:22 am I don't know why the service stops.
Android service doesn't work when I close app
by rlebeau
Tue Oct 06, 2020 10:43 am
Forum: Technical
Topic: [Android]BASS
Replies: 26
Views: 3637

Re: [Android]BASS

Are my first steps in creating a service correct? Again, I direct you to the Android documentation, which discusses this in detail: Media app architecture overview Audio app overview The key is to write a service that implements MediaBrowserService and contains a MediaSession, and write a UI app th...
by rlebeau
Mon Oct 05, 2020 1:49 pm
Forum: Technical
Topic: [Android]BASS
Replies: 26
Views: 3637

Re: [Android]BASS

Is it my steps correctly? I am not an Android developer, so this is WAY outside my area of expertise. 2. And in the application, send broadcast messages about the start or stop of playback. Unless you want other apps to control your service, using broadcast messages is not the best way to communica...
by rlebeau
Mon Oct 05, 2020 10:12 am
Forum: Technical
Topic: [Android]BASS
Replies: 26
Views: 3637

Re: [Android]BASS

If I minimize my application and lock the screen on the phone, then after a couple of minutes the player stops playing. Android is likely killing your app process when it goes into the background and stays there for a period of time. Understand the Activity Lifecycle How do I make the player work i...
by rlebeau
Fri Oct 02, 2020 10:56 am
Forum: Technical
Topic: [Android]BASS
Replies: 26
Views: 3637

Re: [Android]BASS

This is stated as much in the BASS_SetVolume() documentation : This function affects the volume level of all applications using the same output device. If you wish to only affect the level of your application's sounds, the BASS_ATTRIB_VOL attribute and/or the BASS_CONFIG_GVOL_MUSIC / BASS_CONFIG_GVO...