Hello Paul,
About the new messages you've added to RR and FreeDrive; if you forward these messages to me I will add them to CPCTuner, no problem.
But I want to ask you another question about RR and any other frontend for that matter, would it not be a lot easier to use the DLL and just build an interface between RR and the DLL? Of course the current way of communicating (Windows messages) between RR and RRHQCT (or CPCTuner) could remain the same for events and stuff. I just think that using a DLL has more advantages then working with a separate application like CPCTuner or RRHQCT. David already uses my DLL for HQCT support in Centrafuse and Mischka76 is also using it for his frontend.
Perhaps we can start a discussion here on what needs to be in the DLL and how we want to interface with it. Then I can alter/extend my code to meet this requirements and everybody that wants to add HQCT support to any software could use this as a standard interface. What do you think?
A possibility could be that the DLL uses tcpip sockets, once the device is activated via the frontend a server socket will be created in the DLL on 127.0.0.1 with a specified port to interface with the outside world. Messages like volume controle and RDS can easily be exchanged in this way and there will be no problem with things like calling conventions between different compilers. Let me know what you think of it, I believe that it would be best to start with what messages needs to be send between the frontend/application <-> DLL and then we can discuss on what sort of interface we are going to use. I can start with a list of the commands that my DLL uses that can we can extend. I'm not saying that we MUST use my DLL, I'm simply suggesting this because the DLL already exists and I have source code to control almost all HQCT functions, including a working RDS engine and eA support (TMC is on my agenda).
Please let me know what you (and any other developer) thinks of this!
Regards,
Putput
Here is a list of the DLL functions that I used:
Code:Calling conventions: The DLL exports its functions in stdcall = Windows API calls // Init the software/module function InitHQCT : longbool; stdcall; external 'HQCT.DLL' // Stop the software/module procedure FreeHQCT; stdcall; external 'HQCT.DLL' // Change FM frequency procedure HQCTSetFMFrequency(FM_Freq : integer); stdcall; external 'HQCT.DLL' // Change AM frequency procedure HQCTSetAMFrequency(AM_Freq : integer); stdcall; external 'HQCT.DLL' // Switch betweeontn FM/AM band procedure HQCTSwitchBand(FM_On : longbool); stdcall; external 'HQCT.DLL' // Mute - unmute sound procedure HQCTMute(Mute_On : longbool); stdcall; external 'HQCT.DLL' // The THQCTData type in the next function is a simple array of 128 bytes!! function HQCTReadDataBuffer : THQCTData; stdcall; external 'HQCT.DLL' // Search up for next available station function HQCTScanUp : integer; stdcall; external 'HQCT.DLL' // Search down for next available station function HQCTScanDown : integer; stdcall; external 'HQCT.DLL' // Search up for next available station (async method) procedure HQCTScanUpAsync; stdcall; external 'HQCT.DLL' // Search down for next available station (async method) procedure HQCTScanDownAsync; stdcall; external 'HQCT.DLL' // Frequency 1 step higher (step value depends on settings in .ini file!! procedure HQCTStepUp; stdcall; external 'HQCT.DLL' // Frequency 1 step higher (step value depends on settings in .ini file!! procedure HQCTStepDown; stdcall; external 'HQCT.DLL' // Seek sensitivity, 0 = very sensitive seek, 4 = low sensitive seek for up/down scan functions procedure HQCTSetSeekSentive(Sens_Value : integer); stdcall; external 'HQCT.DLL' // Select the sound source for the audio output, 0=Tuner; 1=CD; 2=Phone; 3=Navigation procedure HQCTSetSoundSource(Src_Value : integer); stdcall; external 'HQCT.DLL' // Set the sound volume for the audio output, 0 = low; 68 = high procedure HQCTVolume(Volume_Value : integer); stdcall; external 'HQCT.DLL' // Set the sound loudness for the audio output, 0 = low; 68 = high procedure HQCTLoudness(Loudness_Value : integer); stdcall; external 'HQCT.DLL' // Set the sound bass for the audio output, 0 = low; 7 = high procedure HQCTBass(Bass_Value : integer); stdcall; external 'HQCT.DLL' // Set the sound treble for the audio output, 0 = low; 7 = high procedure HQCTTreble(Treble_Value : integer); stdcall; external 'HQCT.DLL' // Get current frequency function HQCTGetFrequency : integer; stdcall; external 'HQCT.DLL' // Get FMBand function HQCTGetFMBand : longbool; stdcall; external 'HQCT.DLL' The return buffer of the HQCTReadDataBuffer function has the following structure: begin byte end byte format Description - 0 7 char Station name, when in FM mode with RDS () - 8 87 char RDS text, when in FM mode with RDS - 88 91 32 bit integer The actual FM frequency between 8700 and 10800MHz, no decimal point!! - 92 95 32 bit integer The actual AM frequency in KHz - 96 96 byte 0 = mono; 1 = stereo - 97 97 byte 0 = sound; 1 = mute - 98 98 byte Seek sensitivity 0 = very sensitive 4 = least sensitive - 99 99 byte Reception level - 100 100 byte Sound source 0=Tuner; 1=CD; 2=Phone; 3=Navigation - 101 101 byte 0 = AM; 1 = FM band - 102 127 reserved Reserved for future use The following calls are implemented for Radiator but can be used by all other programs as well: (Please look at the Radiator documentation for use/results of these calls) function GetModuleComment: PChar; stdcall; //description, copyright etc. procedure TuneFreq (Freq: LongInt); stdcall; //matches FM_TUNE; //frequency in kHz (88.2 MHz -> 88200 kHz) procedure TuneFreqMuted (Freq: LongInt); stdcall; //matches FM_TUNEMUTED //frequency in kHz (88.2 MHz -> 88200 kHz) procedure SetMute (Mute: Boolean); stdcall; //matches FM_MUTEUNMUTE function ScanStation (DirectionUp:Boolean; FreqToSearchFrom: LongInt): LongInt; stdcall; //matches FM_SCANSTATION //parameters are //direction (up to high range or down to low range //and current frequency to search from //it returns new frequency function GetVolume: Word; stdcall; //matches GETVOLUME procedure SetVolume (Left,Right: Word); stdcall; //matches FM_SETVOLUMEBYVALUE procedure VolumeUpDown(Step: Integer); stdcall; //matches FM_SETVOLUMEBYVALUE procedure SetBass(Bass: Word); stdcall; //matches FM_BASSTREBLE function GetBass: Word; stdcall; //matches FM_BASSTREBLE procedure SetTreble(Treble: Word); stdcall; //matches FM_BASSTREBLE function GetTreble: Word; stdcall; //matches FM_BASSTREBLE function IsStereo: Boolean; stdcall; //matches FM_ISSTEREO procedure SetStereo (Stereo: Boolean); stdcall; //matches FM_SETSTEREO function GetSignal: Word; stdcall; //matches FM_GETSIGNAL procedure ConfigurationDialog; stdcall; //matches FM_CONFIGURATIONDIALOG



LinkBack URL
About LinkBacks
Reply With Quote

), brought CPCTuner (and the DLL) to its current level. 
)

Bookmarks