Home > database >  Consult ace: original concept written wav files
Consult ace: original concept written wav files

Time:09-28

I recently written a use PowerBuilder9.0 voice real-time monitoring program (server to make a phone call, customer if the message, the client can monitor), now the client can obtain real-time audio data (uncompressed), but have difficulty, if play a wav format, you need to add the file header, can be directly in front of the data flow, as if can't play, request to master some directions!!!!!!

CodePudding user response:

Problems added: use waveOutWrite () function can play through the sound card, now consult how to use in the pb waveOutPrepareHeader () and waveOutWrite () two functions, please myself!!!!!!

CodePudding user response:

What is the mode of the recording, the original poster is used if the sound card or voice box provides corresponding burst function

CodePudding user response:

Recording sound card is used, but due to my listening on the client, the client has no sound card, so can only send the recording data through the winsock to the client, the client through the sound card, just check it on the website to use waveOutPrepareHeader () and waveOutWrite () function, but I don't know how to declare and use, consult!

CodePudding user response:

Please speak enthusiastically, have used is not important, we discuss has the harvest,

CodePudding user response:

With voice tools, xunfei can

CodePudding user response:

Direct call API function,
Can the

CodePudding user response:

If is the wav format audio files, you can use Api function PlaySound:
The Function Long PlaySound (String Filename, Int Mod, Int Flags) Library "winmm. DLL
"
String ls_Sound
Ls_Sound="c: \ aa. Wav"
PlaySound (ls_Sound, 0, 1)

CodePudding user response:

refer to 6th floor ZHGWBZHD response:
direct call API function,
Can

As if to call waveoutopen ()
The Function ulong waveOutOpen (ref ulong lphWaveOut, ulong uDeviceID, ref WAVEFORMAT lpFormat, ulong dwCallback, ulong dwInstance, ulong dwFlags) LIBRARY "winmm. DLL
"Inside the first parameter is the handle of a pointer, the second is the device number, the third is a structure pointer, the parameter is the callback what of, these parameters in pb should be how to do?

CodePudding user response:

The Function Boolean sndPlaySoundA (string SoundName, ulong Flags) Library "WINMM. DLL
"The Function ulong waveOutGetNumDevs () Library "WINMM. DLL"

CodePudding user response:

//play Wav
Ulong lul_numdevs
Lul_numdevs=WaveOutGetNumDevs ()
If lul_numdevs & gt; 0 Then
SndPlaySoundA (wav, 1)
End If

CodePudding user response:

The
references to the tenth floor ZHGWBZHD response:
//play Wav
Ulong lul_numdevs
Lul_numdevs=WaveOutGetNumDevs ()
If lul_numdevs & gt; 0 Then
SndPlaySoundA (wav, 1)
End the If

Oh, this function is not play wav files? I want to play is real-time audio data stream, accept while playing, if each accept a data flow is generated file, will affect the smooth?

CodePudding user response:

Hope that we speak a lot, especially used waveoutopen () function,

CodePudding user response:

Hope that we speak a lot, especially used waveoutopen () function,

CodePudding user response:

I have to learn,
  • Related