DAPlay - Developers Page

DAPlay source code
In order to do adaptations to the software download the source code here. You will also need to have the Delphi components TDropFileTarget (get it here) and TDfsMRUFileList (get it here) installed if you work with the application (it is not necessary for the TDAPlayerComponent).

The recommended environment for development is Borland Delphi or Borland C++, but you are not limited to this, because:

  • There is a feature in the source code, which makes it possible to subscribe to messages in response to certain events. In this way any application you write can respond to these events and for instance change the display whenever the VU-level changes or update the remaining playback time every tenth of a second, and so on... As long as you can handle windows messages you can in fact use any programming language to respond to basically whatever you want to, while your application is running.
  • A previous version of DAPlay could handle command line commands and option. With the current version this has been disabled, but you can still use whatever programming language you want, as long as it can make calls to a .DLL.

Please first check the "to do" list, if you want to participate. Please select your development environment and language for more detailed information:

The Delphi component containing almost all of the features of DAPlay is called TDAPlayerComponent.

The Delphi component is dependent on the DALib2.dll, which is compiled in C++. The original MAPlay source code is in C, so it is not possible to compile this in Delphi. If you want to do low-level changes, then you will have to go to C++ Builder, or Microsoft Visual C++.

The DAPlay application uses the TDAPlayerComponent and adds just a few features regarding the visual feedback of the playback. You might want to adapt the application source code in order to have a different look and feel, or you might want to add some special handling to your own application. There is also code for two other application: A Minimal application and a Test application. These might be helpful in order to understand how to use the TDAPlayerComponent.

Return to top

C++ Builder
The component TDAPlayerComponentC5 is implemented and tested in C++ Builder and works just like in the Delphi source code. There is a simple Test program for testing the TDAPlayerComponentC5 available, but the DAPlay application source code itself is not available in C++ yet. This is not a lot of work, it should be fairly easy to look at the Delphi source code and do the same in C++.

The full source code for the component TDAPlayerComponentC5 is available, but I have sometimes had some problems with installing the component from the package. It should now be in a state where it works, but should you have experiences with C++ Builder and writing packages, please feel free to improve the code.

Return to top

Microsoft Visual C++
All the source code within the DALib subdirectory is compatible with MSVC and can be compiled to a resulting .dll (DALib2.dll). The project workspace is called DAPlay.dsw and is found under the MSVC subdirectory (it also references all the DALib files). Unfortunately there is no good example application for test purposes at the moment. It should not be to difficult to write one, though.

In case you have experience with writing COM and ActiveX components, and also happen to know a bit about how Borland components work, then you could look at the source code for the TDAPlayerComponent and write a similar COM component in MSVC. Should not be too difficult!

Return to top

Linux and other Unix versions
There is no version of DAPlay for Linux at the moment. The MAPlay source code originates from the UNIX environment, so it should be easy to port this code back to Linux again. Look at all the lines with the "#if defined(__BORLANDC__)" precompiler directives, mainly within the assist.cpp or SafeMemList.cpp units.

Subscribing on messages from the Windows message queue can probably not be translated one to one for Linux, but the principle should work in some other form. As soon as I have a Borland Kylix release for Linux I will try to look into porting the code. Maybe somebody wants to try it even before then?

Return to top

Another language/environment
If you work with another language or environment you will have to use the DALib2.dll.

For a list of the available functions and the parameters for calls to the .DLL see the unit DALib2.h in the DALib subdirectory.

Return to top