Is there any simple function? I am searching something like that
Play(@data, 44000, 100 {time});
The Win32 API PlaySound function can play standard RIFF-encoded audio (such as WAV audio) from a memory block by using its SND_MEMORY flag. Alternatively, if the audio is in the app's resources, you can use the SND_RESOURCE flag instead.
SND_MEMORY
SND_RESOURCE