I currently have a number of .WAV files that I play using Access 2007. I would like to convert those files to MP3 files (because they are much smaller) and play them using Access. I have the following code:
Option Compare Database
Const SND_ASYNC = (1)
Const SND_NODEFAULT = (2)
Declare Function sndplaysound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
Public Sub API_PlaySound(pWmaFile As String)
Dim LResult As Long
'Make a Windows API call to play a wav file
LResult = sndplaysound(pWmaFile, SND_NODEFAULT + SND_ASYNC)
This code allows the audio to play without opening the Player for the user to see. It just plays in the file.
Is there code I can use to run MP3 files the same way?