Can I trigger an event without a control??

mjcoon

Well-Known Member
Licensed User
I admit I've not experimented (my only use of Sound() has been with a short file) but I assumed that Sound() was synchronous. Thus it does not return until the file has finished playing, and you cannot get into trouble by playing another file while the first still plays. (If you could, what would be the result: failure of 2nd call; cacophony?)

If I'm right, your desired "event" is just the execution of the next statement...

Mike.
 

limhyeam

Member
I fully agree when you are playing a short wav file. However, returning an event would be a nice feature and also provide a lot of flexibility to the programmer too, for example, playing a background music continuously throughout the program.

Is there any other media player command that can return an event back?

There are many ways to handle if a user were to activate two sound() function. This is exactly why we can use a call-back function (sound event), to know whether the first wav file has been finished playing or not. If not yet, we can prohibit the second one from playing. If we receive the finish sound event, then, we can allow the programmer to start the second one.

I dont see there is anything wrong to that, but, if currently this is not possible, would there be any other command that can help me to play the same wav file repeatedly and continuously?

Thanks. :sign0089:
 

limhyeam

Member
I also have another question regarding raising events. Is there any command that we can do to raise an event without even having a control??

Just curious. So far, I noticed that there are none. Am I right? :sign0089:
 

mjcoon

Well-Known Member
Licensed User
The FMOD library is much more powerful than Sound keyword.

My music player uses FMOD and it is asynchronous in that the sound file keeps playing in the background while the program runs. To enable my program to go on to play the next file in a playlist it uses a timer to check for progress=100%. Agreed an event would be more event-orientated (!), but my program also shows the progress graphically by updating a TrackBar (which also allows the user to skip forwards or back), so I'd want the timer anyway.

I've been meaning to publish my code in one of the forums when I've written it up...

Mike.
 

limhyeam

Member
Hi,

When I mentioned about raising event, I was thinking something like in a call-back function, I will be able to raise an event to activate the next function.

I know the events are either tied to controls or timer, but, user/programmer will not be able to raise the event as they want to. Am I right to say that?

Cheers
 

tsdt

Active Member
Licensed User
This account is registered under my other account.

I was actually trying to explore the flexibility and easiness of programming in this language, so that in future, we can purchase the enterprise version or more license for the software engineers to use, only if the language can actually cater for our needs.

I hope that you can clear the issue I had over here. Thanks.
 
Last edited:

tsdt

Active Member
Licensed User
Thanks Mjcoon / Erel

I am currently trying to use FMOD library for my application. However, I face a error message.

"Error loading program. Could not load file or assembly 'file:///C:\Test\fmodce.dll" or one of its dependencies. The module was expected to contain an assembly manifest."

I have no idea what the heck this mean. I just copy the fmodce.dll to program file\anywhere software\basic4ppc as what the instruction was telling me.

The other thing is that I was wondering whether when I started to play the music, do I need to stop it when it reaches the end of the song or it will automatically stop by itself.

Thanks.. :sign0089:
 

tsdt

Active Member
Licensed User
Thanks Agraham.

Actually, the device IDE will not contain the installation of B4PPC.

We will compile our player code into exe and hopely can run under WinCE 6.5, which is the OS of the device currently. I dont think we need to attach the fmodce.dll along with the .exe, or do we??

In that case, I was wondering whether it will post any problems or not. On top of that, I also notice that for fmodce.dll, there are so many types of fmodce.dll to choose from. Provided that my application is meant to operate across many devices, which I have no idea of the processor type. Is there a generic fmodce.dll which I can use for all?

Thanks.
 

agraham

Expert
Licensed User
Longtime User
Actually, the device IDE will not contain the installation of B4PPC.
I didn't assume that! What I said stands. On a device native dlls are picked up from the folder where the application is started from. If you want to develop/test under the IDE on the device a copy of fmodce.dll will need to be in the IDE installation folder.

For a compiled application fmodce.dll will need to be installed in the folder where the application is installed for the reason given above.
 

agraham

Expert
Licensed User
Longtime User
Is there a generic fmodce.dll which I can use for all?
All present devices use ARMV4 compatible CPUs, certainly if running WindowsMobile 6.0 or later. Anything that doesn't is ancient (sort of). Is it really WinCE you are developing for or Windows Mobile? There is a difference.
 

tsdt

Active Member
Licensed User
Actually, we are supposed to develop for both platform as in WinCE and Window Mobile.

I fully aware that there are a lot of differences in those two platform. My main concern is that if I develop this fmod.play functions for both platform, will B4PPC able to distinguish which fmod.dll to be used?? Provided that I attached the right dll correctly with the executable.
 

agraham

Expert
Licensed User
Longtime User
WinCE environments can be variable as they depend upon which features the manufacturer chose to include as WinCE is entirely customisable. Windows Mobile, although based on WinCE, is a strictly defined (by Microsoft) implementation of WinCE to which manufacturers have to abide so is much more predictable as to what is included.

You will probably need different Form layouts or will need alter the Form layout programmatically between WinCE and WindowsMobile. On WinCE, which usually allows variable size windows, the menu bar occupies the top part of the client area of the window rather than being shown separately at the bottom of the screen. You may or may not find a SIP (Soft Input Panel) i.e. on screen keyboard, and some libraries that make calls to native APIs may or may not work on WinCE depending upon whether that functionality was included by the device manufacturer.

I don't know if fmodce.dll would work on any/all WinCE devices as it relies upon the sound hardware specified by the Windows Mobile specification that may not be included on some/all WinCE devices.
 
Last edited:
Top