Un saluto a tutti...
Ho necessità di effettuare registrazioni audio a 768 kbps...
Utilizzando la funzione mci send string, i file audio mi vengono registrati ad 88kbps...
Così ho utilizzato la funzione mcisendcommand realizzando una cosa di questo tipo:
codice:
UINT wDeviceID;
   DWORD dwReturn;
   MCI_OPEN_PARMS op;


   op.lpstrDeviceType = (LPCSTR) MCI_DEVTYPE_WAVEFORM_AUDIO;


   
   if (dwReturn = mciSendCommand(0, MCI_OPEN,MCI_OPEN_TYPE | MCI_OPEN_TYPE_ID,
      (DWORD)(LPVOID) &op))
                        cout << "errore" << endl;
    
   wDeviceID = op.wDeviceID;
   cout << wDeviceID << endl;   
     
   MCI_WAVE_SET_PARMS configurazione;
   configurazione.nSamplesPerSec=48000;
   configurazione.wBitsPerSample=16; 
   
   mciSendCommand(wDeviceID,MCI_SET,MCI_NOTIFY,(DWORD) &configurazione);
   
        
   ifstream fprompt(promtspath);
   
   for(int i=0; i<WAV_SAMPLES_NUM; i++)
        {
        cout << "Premere invio quando si è pronti" << endl;
        system("PAUSE");
        mciSendString("open new type waveaudio alias mysound","",0,0);
        mciSendString("record mysound","",0,0);
        
        cout << "Registrando sample" << i+1 << endl;
        cout << "Dire:" << endl;
        
        fprompt>>temp;
        fprompt.getline(audio,LINESIZE);
        
        cout << audio << endl;
        system("PAUSE");
        itoa(i+1,samplenumber,10);
        strcpy(wavpathparticular,wavpathgeneral);
        strcat(wavpathparticular,samplenumber);
        strcat(wavpathparticular,".wav");
        mciSendString(wavpathparticular,"",0,0);
        }
I miei file audio risultano però sempre di 88kbps...
Dove sbaglio?!
L'errore si trova quando utilizzo il comando MCI_SET nella funzione mcisendcommand.
La mcisendcommand mi restituisce il numero 274 che significa che il dispositivo in uso non supporta il comando specificato...
Come risolvere l'errore?!
Vi ringrazio
Un saluto