Playing Audio With Flic
21-Jul-95 12:14:57
Sb: Playing Audio With Flic
Fm: Malcolm McGennity 100546,1716
To: Brian Rudolph [Adesk] 71722,170
Hello Brian,
I have a couple of questions regarding the playing of FLC animations:
1) In order to play a WAV file in conjunction with a FLC file, I am using the
following code in conjunction with the "Animation Support Libraries R2.0"
aaSound ( hAAFlicAnim, // Animation Handle
NULL, // This is NULL as we asume MCI
extensions have been setup
lpszFlicAudioFile, // Name of the audio file (
*.wav, *.mid )
AA_SNDFREEZE );
This will sometimes result with a message box appearing with "The Specified
Sound is Invalid". It is also the case that when I use the Animation Player
application and hit "Get Sound" from the FILE menu, I don't get the waveaudio
device listed in the Sound Devices list box and get the same message as above
when I try to select a WAV file. Incidentally, Sequencer and CDAudio always
appear.
Now, if I change the settings for the MCI Sound Drivers from the Windows
Control Panel to different values between 2 and 9 seconds of buffered audio
data, the device "waveaudio" reappears in the Animation Player and my
application plays the FLC and WAV file successfully!! However, this only works
on a random basis across different PC's.
Can you shed any light on this problem?
It is especially important that we resolve this as we intend to include FLC's
with audio on our CD-ROM titles and hence, do not expect the user to have to
manually adjust driver settings. We load mciapp.drv to C:\WINDOWS\SYSTEM and
make the appropriate changes to WIN.INI and SYSTEM.INI in our installation
program for the disc.
2) Can you send a sample of 'C' code which will simply stop a FLC on it's last
frame and hold it on the screen. Again this will be in conjunction with an
audio file which may be longer or shorter than the duration of the animation.
What I've been trying is:
// Load the FLIC File
hAAFlicAnim = aaLoad ( lpszFlicFile, // Animation File
hWnd, // Parent window that
owns the animation
AA_FULLSCREEN, // wMode
ptFlicOrigin.x, // x coord for top left of animation window
ptFlicOrigin.y, // y coord for top left
of animation window
nFlicWidth, // Width of
animation window
nFlicHeight, // Height of
animation window
0, // x coord of
the animation displayed at ul
0 ); // y coord of
the animation displayed at ul
// Set up for play to end on the specified frame
if ( (aaSetParm( hAAFlicAnim,
AA_LOOPS,
NULL,
dwFlicFrames )) == NULL )
return (FLIC_ERR);
This will indeed stop the FLC but the frame on the screen appears with a
"shadow" image of itself.
I've also tried:
// End the animation with the sound.
if ( (aaSetParm( hAAFlicAnim,
AA_LOOPS,
NULL,
MAKELONG(AA_LOOPSOUND, AA_LOOPSOUND) )) == NULL );
return (FLIC_ERR);
This doesn't stop the sound and the FLC from looping. In fact, nothing I've
tried, other setting play to end on a specified frame, has been able to stop
the looping behaviour.
Sorry to ask for so much detail on my first visit to this forum, but I hope you
will be able to give some pointers.
Many Thanks,
Donald MacLeod
First Information Group
U.K.