Miten Visual Basicilla pystyy nauhoittamaan mikrofonista tulleita ääniä! Toivoisin pikaista vastausta
Tässä otteita koodistani.
Muista myös laittaa mikrofoni päälle äänimikserin NAUHOITA puolelta.
'tämä alkuun Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String, ByVal lpstrReturnString As String, ByVal uReturnLength As Long, ByVal hwndCallback As Long) As Long ................ ................ On Local Error Resume Next .............. .............. ' prepare for recording tiedosto = polku + Text2 & "_" & NoSpaces(Text1) & ".wav" Kill tiedosto i = mciSendString("open new type waveaudio alias capture", RS, 128, cb) i = mciSendString("set capture format tag pcm", RS, 128, cb) If Option1.Value = True Then 'CD stereo i = mciSendString("set capture channels 2", RS, 128, cb) i = mciSendString("set capture bitspersample 16", RS, 128, cb) i = mciSendString("set capture samplespersec 44100", RS, 128, cb) i = mciSendString("set capture alignment 4", RS, 128, cb) 'If i <> 0 Then DisplayError i i = mciSendString("set capture bytespersec 176400", RS, 128, cb) 'If i <> 0 Then DisplayError i End If ....... ...... ' record i = mciSendString("set capture time format ms", RS, 128, cb) i = mciSendString("record capture", RS, 128, cb) ...... ...... 'stop recording this file kesto = Timer - t1# ' for display when playing it i = mciSendString("stop capture", RS, 128, cb)
'nämä jäi mainitsematta
RS As String, cb As Long,
Saiskos saman vähän selvemmin
Aihe on jo aika vanha, joten et voi enää vastata siihen.