Accueil > > > MOTEUR AUDIO TEMPS REEL AVEC GESTION DU VOLUME
MOTEUR AUDIO TEMPS REEL AVEC GESTION DU VOLUME
Information sur la source
Description
Permet de faire passer par un buffer l'entrée ligne et l'envoyer à la sortie carte son en réglant le volume. Suite du développement: equalizer, analyse de spectre
Source
-
- // base.cpp
-
- #include "stdafx.h"
- #include "base.h"
-
- BOOL OpenedIn = FALSE;
- HANDLE recordDone;
- HWAVEIN hWaveIn;
- DWORD threadidIn;
- HANDLE RecordHandle;
- PWAVEHDR pWaveHeaderIn[NB_BUFFER];
-
- BOOL OpenedOut = FALSE;
- HANDLE playDone;
- HWAVEOUT hWaveOut;
- DWORD threadidOut;
- HANDLE PlayHandle;
- PWAVEHDR pWaveHeaderOut[NB_BUFFER];
-
- short Buffer[TAILLE_BLOC * CANAUX];
-
- HWND DlgMain;
-
- CRITICAL_SECTION CriticalSection;
- int volume_general; // 0 a 1000
-
- //****************************************************************************
-
- void CALLBACK waveInProc(HWAVEIN hwi, UINT uMsg, DWORD dwInstance, DWORD dwParam1, DWORD dwParam2)
- {
- if (uMsg == WIM_OPEN)
- {
- MessageBox(DlgMain,"WIM_OPEN","RTA",MB_OK);
- OpenedIn = TRUE;
- }
-
- if (uMsg == WIM_CLOSE)
- {
- MessageBox(DlgMain,"WIM_CLOSE","RTA",MB_OK);
- }
-
- if (uMsg == WIM_DATA)
- {
- SetEvent(recordDone);
- }
- }
-
- //****************************************************************************
- // 01 WHDR_DONE indique que c'est fini avec ce buffer.
- // 02 WHDR_PREPARED indique que le buffer a ete prepare (waveInPrepareHeader ou waveOutPrepareHeader)
- // 04 WHDR_BEGINLOOP indique que ce buffer est le premier dans une boucle, drapeau utilisé seulement en sortie.
- // 08 WHDR_ENDLOOP indique que ce buffer est le dernier dans une boucle. Ce drapeau est utilisé seulement en sortie.
- // 10 WHDR_INQUEUE indique que le buffer est mis en queue pour la sortie.
- //****************************************************************************
-
- DWORD WINAPI InThreadProc(LPVOID lpParam)
- {
- int wbi=0;
-
- __1: WaitForSingleObject(recordDone, INFINITE);
- if (pWaveHeaderIn[wbi]->dwFlags & WHDR_DONE)
- {
- EnterCriticalSection(&CriticalSection);
- copier_buffer(Buffer, (short *)pWaveHeaderIn[wbi]->lpData, TAILLE_BLOC * CANAUX); // sauvegarder bloc recu
- waveInUnprepareHeader(hWaveIn, pWaveHeaderIn[wbi], sizeof(WAVEHDR));
- pWaveHeaderIn[wbi]->dwFlags = 0;
- waveInPrepareHeader(hWaveIn, pWaveHeaderIn[wbi], sizeof(WAVEHDR));
- waveInAddBuffer(hWaveIn, pWaveHeaderIn[wbi], sizeof(WAVEHDR));
-
- __asm // modulo
- {
- mov eax, wbi
- mov ebx, NB_BUFFER
- inc eax
- cmp eax, ebx
- jb fin1
- xor eax, eax
- fin1: mov wbi, eax
- }
- LeaveCriticalSection(&CriticalSection );
- }
-
- __asm
- {
- jmp __1
- }
-
- waveInReset(hWaveIn);
- waveInClose(hWaveIn);
- MessageBox(DlgMain,"FIN","RTA",MB_OK);
- OpenedIn = FALSE;
- return 0;
- }
-
- //****************************************************************************
-
- void CALLBACK waveOutProc(HWAVEOUT hwo, UINT uMsg, DWORD dwInstance, DWORD dwParam1, DWORD dwParam2)
- {
- if (uMsg == WOM_OPEN)
- {
- MessageBox(DlgMain,"WOM_OPEN","RTA",MB_OK);
- OpenedOut = TRUE;
- }
-
- if (uMsg == WOM_CLOSE)
- {
- MessageBox(DlgMain,"WOM_CLOSE","RTA",MB_OK);
- }
-
- if (uMsg == WOM_DONE)
- {
- SetEvent(playDone);
- }
- }
-
- //****************************************************************************
-
- DWORD WINAPI OutThreadProc(LPVOID lpParam)
- {
- int wbo=0;
-
- __1:WaitForSingleObject(playDone, INFINITE);
-
- if (pWaveHeaderOut[wbo]->dwFlags & WHDR_DONE)
- {
- waveOutUnprepareHeader(hWaveOut, pWaveHeaderOut[wbo], sizeof(WAVEHDR));
- pWaveHeaderOut[wbo]->dwFlags = 0;
-
- regler_volume(Buffer, volume_general, 1000.0, TAILLE_BLOC * CANAUX); // appliquer le volume avant de l'envoyer
- copier_buffer((short *)pWaveHeaderOut[wbo]->lpData, Buffer, TAILLE_BLOC * CANAUX); // reprendre bloc recu
- waveOutPrepareHeader(hWaveOut, pWaveHeaderOut[wbo], sizeof(WAVEHDR));
- waveOutWrite(hWaveOut, pWaveHeaderOut[wbo], sizeof(WAVEHDR));
-
- __asm
- {
- mov eax, wbo
- mov ebx, NB_BUFFER
- inc eax
- cmp eax, ebx
- jb fin1
- xor eax, eax
- fin1: mov wbo, eax
- }
-
- }
-
- __asm
- {
- jmp __1
- }
-
-
-
-
-
- return 0;
- }
-
- //****************************************************************************
-
- int OuvrirPeripheriques()
- {
- int i;
- WAVEFORMATEX WaveFormat;
-
- WaveFormat.nChannels = CANAUX; // 1 pour mono 2 pour stereo
- WaveFormat.wBitsPerSample = 16; // 16 bit
- WaveFormat.nAvgBytesPerSec = SAMPLERATE * WaveFormat.nChannels * WaveFormat.wBitsPerSample/8; // nombre d'octets par seconde
- WaveFormat.wFormatTag = 1; // 1 pour PCM
- WaveFormat.nSamplesPerSec = SAMPLERATE; // frequence d'echantillonnage
- WaveFormat.nBlockAlign = 1;
- WaveFormat.cbSize = 0;
-
- for(i=0; i<NB_BUFFER; i++)
- {
- pWaveHeaderIn[i] = (PWAVEHDR) malloc(sizeof(WAVEHDR));
- }
-
- InitializeCriticalSection(&CriticalSection);
-
- if (waveInOpen(&hWaveIn, WAVE_MAPPER, &WaveFormat, (DWORD)waveInProc, (DWORD)&CriticalSection, CALLBACK_FUNCTION))
- {
- MessageBox(DlgMain,"Ouverture périphérique d'entrée impossible","RTA",MB_OK);
- return 0;
- }
-
- for(i=0; i<NB_BUFFER; i++)
- {
- pWaveHeaderIn[i]->lpData = (LPSTR) malloc(BUFFER_SIZE); // reserve des octets et non des short
- pWaveHeaderIn[i]->dwBufferLength = BUFFER_SIZE;
- pWaveHeaderIn[i]->dwBytesRecorded = 0;
- pWaveHeaderIn[i]->dwUser = 0;
- pWaveHeaderIn[i]->dwFlags = 0;
- pWaveHeaderIn[i]->dwLoops = 0;
- pWaveHeaderIn[i]->lpNext = NULL;
- pWaveHeaderIn[i]->reserved = 0;
- }
-
- for(i=0; i<NB_BUFFER; i++)
- {
- if (waveInPrepareHeader(hWaveIn, pWaveHeaderIn[i], sizeof(WAVEHDR)))
- {
- MessageBox(DlgMain,"Erreur waveInPrepareHeader","RTA",MB_OK);
- return 0;
- }
- }
-
- for(i=0; i<NB_BUFFER; i++)
- {
- if (waveInAddBuffer(hWaveIn, pWaveHeaderIn[i], sizeof(WAVEHDR)))
- {
- MessageBox(DlgMain,"Erreur AddBuffer","RTA",MB_OK);
- return 0;
- }
- }
-
- ResetEvent(recordDone);
-
- if (waveInStart(hWaveIn))
- {
- waveInClose(hWaveIn);
- }
-
-
-
- //****
- for(i=0; i<NB_BUFFER; i++)
- {
- pWaveHeaderOut[i] = (PWAVEHDR) malloc(sizeof(WAVEHDR));
- }
-
- if (waveOutOpen(&hWaveOut, WAVE_MAPPER, &WaveFormat, (DWORD)waveOutProc, 0L, CALLBACK_FUNCTION))
- {
- MessageBox(DlgMain,"Ouverture périphérique de sortie impossible","RTA",MB_OK);
- return 0;
- }
-
- for(i=0; i<NB_BUFFER; i++)
- {
- pWaveHeaderOut[i]->lpData = (LPSTR) malloc(BUFFER_SIZE); // reserve des octets et non des short
- pWaveHeaderOut[i]->dwBufferLength = BUFFER_SIZE;
- pWaveHeaderOut[i]->dwBytesRecorded = 0;
- pWaveHeaderOut[i]->dwUser = 0;
- pWaveHeaderOut[i]->dwFlags = 0;
- pWaveHeaderOut[i]->dwLoops = 0;
- pWaveHeaderOut[i]->lpNext = NULL;
- pWaveHeaderOut[i]->reserved = 0;
- }
-
- for(i=0; i<NB_BUFFER; i++)
- {
- if (waveOutPrepareHeader(hWaveOut, pWaveHeaderOut[i], sizeof(WAVEHDR)))
- {
- MessageBox(DlgMain,"Erreur PrepareHeader","RTA",MB_OK);
- return 0;
- }
- }
-
- for(i=0; i<NB_BUFFER; i++)
- {
- if (waveOutWrite(hWaveOut, pWaveHeaderOut[i], sizeof(WAVEHDR)))
- {
- MessageBox(DlgMain,"Erreur OutWrite","RTA",MB_OK);
- return 0;
- }
- }
- ResetEvent(playDone);
- //*******
-
-
- return 0;
- }
-
- //****************************************************************************
-
- BOOL CALLBACK DlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
- {
- if (msg == WM_INITDIALOG)
- {
- DlgMain = hWnd;
-
- char str[128];
-
- SendDlgItemMessage(hWnd,IDC_SLIDER_VOLUME,TBM_SETRANGEMAX,0,1000);
- SendDlgItemMessage(hWnd,IDC_SLIDER_VOLUME,TBM_SETRANGEMIN,0,0);
- SendDlgItemMessage(hWnd,IDC_SLIDER_VOLUME,TBM_SETPOS,1,0); // volume general a fond
- volume_general = 1000-SendDlgItemMessage(hWnd,IDC_SLIDER_VOLUME,TBM_GETPOS,0,0);
- sprintf(str,"volume: %1.1f dB",20*log10(volume_general/1000));
- SetDlgItemText(hWnd,IDC_STATIC_VOLUME,str);
-
- return 0;
- }
-
-
-
-
- if (msg == WM_VSCROLL)
- {
- char str[128];
-
- volume_general = 1000-SendDlgItemMessage(hWnd,IDC_SLIDER_VOLUME,TBM_GETPOS,0,0);
- if (volume_general == 0)
- {
- sprintf(str,"volume: -oo");
- SetDlgItemText(hWnd,IDC_STATIC_VOLUME,str);
- return 0;
- }
- sprintf(str,"volume: %1.1f dB", 20*log10(volume_general/1000.0));
- SetDlgItemText(hWnd,IDC_STATIC_VOLUME,str);
- return 0;
- }
-
-
-
-
- if (msg == WM_COMMAND)
- {
- if (wParam == IDC_START)
- {
- if(OpenedIn == TRUE)
- {
- MessageBox(DlgMain,"Déjà ouvert","RTA",MB_OK);
- return 0;
- }
- recordDone = CreateEvent(0, FALSE, FALSE, 0);
- ResetEvent(recordDone);
- RecordHandle = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE) InThreadProc, NULL, 0, &threadidIn);
-
- playDone = CreateEvent(0, FALSE, FALSE, 0);
- ResetEvent(playDone);
- PlayHandle = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE) OutThreadProc, NULL, 0, &threadidOut);
-
- OuvrirPeripheriques();
- return 0;
- }
-
- if (wParam == IDCANCEL)
- {
- EndDialog(hWnd, 0);
- return 0;
- }
- }
-
-
-
-
- return 0;
- }
-
- //****************************************************************************
-
- int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
- {
- HANDLE hMutex;
- hMutex = CreateMutex (NULL,FALSE, "RTA");
- if (GetLastError() == ERROR_ALREADY_EXISTS)
- {
- MessageBox(NULL,"Cette application est déjà présente en mémoire !","WARNING",MB_OK|MB_ICONEXCLAMATION);
- return 0;
- }
-
- InitCommonControls();
- DialogBox(hInstance, MAKEINTRESOURCE(IDD_DIALOG1),HWND_DESKTOP,DlgProc);
- return 0;
- }
-
- //*******************************************************
// base.cpp
#include "stdafx.h"
#include "base.h"
BOOL OpenedIn = FALSE;
HANDLE recordDone;
HWAVEIN hWaveIn;
DWORD threadidIn;
HANDLE RecordHandle;
PWAVEHDR pWaveHeaderIn[NB_BUFFER];
BOOL OpenedOut = FALSE;
HANDLE playDone;
HWAVEOUT hWaveOut;
DWORD threadidOut;
HANDLE PlayHandle;
PWAVEHDR pWaveHeaderOut[NB_BUFFER];
short Buffer[TAILLE_BLOC * CANAUX];
HWND DlgMain;
CRITICAL_SECTION CriticalSection;
int volume_general; // 0 a 1000
//****************************************************************************
void CALLBACK waveInProc(HWAVEIN hwi, UINT uMsg, DWORD dwInstance, DWORD dwParam1, DWORD dwParam2)
{
if (uMsg == WIM_OPEN)
{
MessageBox(DlgMain,"WIM_OPEN","RTA",MB_OK);
OpenedIn = TRUE;
}
if (uMsg == WIM_CLOSE)
{
MessageBox(DlgMain,"WIM_CLOSE","RTA",MB_OK);
}
if (uMsg == WIM_DATA)
{
SetEvent(recordDone);
}
}
//****************************************************************************
// 01 WHDR_DONE indique que c'est fini avec ce buffer.
// 02 WHDR_PREPARED indique que le buffer a ete prepare (waveInPrepareHeader ou waveOutPrepareHeader)
// 04 WHDR_BEGINLOOP indique que ce buffer est le premier dans une boucle, drapeau utilisé seulement en sortie.
// 08 WHDR_ENDLOOP indique que ce buffer est le dernier dans une boucle. Ce drapeau est utilisé seulement en sortie.
// 10 WHDR_INQUEUE indique que le buffer est mis en queue pour la sortie.
//****************************************************************************
DWORD WINAPI InThreadProc(LPVOID lpParam)
{
int wbi=0;
__1: WaitForSingleObject(recordDone, INFINITE);
if (pWaveHeaderIn[wbi]->dwFlags & WHDR_DONE)
{
EnterCriticalSection(&CriticalSection);
copier_buffer(Buffer, (short *)pWaveHeaderIn[wbi]->lpData, TAILLE_BLOC * CANAUX); // sauvegarder bloc recu
waveInUnprepareHeader(hWaveIn, pWaveHeaderIn[wbi], sizeof(WAVEHDR));
pWaveHeaderIn[wbi]->dwFlags = 0;
waveInPrepareHeader(hWaveIn, pWaveHeaderIn[wbi], sizeof(WAVEHDR));
waveInAddBuffer(hWaveIn, pWaveHeaderIn[wbi], sizeof(WAVEHDR));
__asm // modulo
{
mov eax, wbi
mov ebx, NB_BUFFER
inc eax
cmp eax, ebx
jb fin1
xor eax, eax
fin1: mov wbi, eax
}
LeaveCriticalSection(&CriticalSection );
}
__asm
{
jmp __1
}
waveInReset(hWaveIn);
waveInClose(hWaveIn);
MessageBox(DlgMain,"FIN","RTA",MB_OK);
OpenedIn = FALSE;
return 0;
}
//****************************************************************************
void CALLBACK waveOutProc(HWAVEOUT hwo, UINT uMsg, DWORD dwInstance, DWORD dwParam1, DWORD dwParam2)
{
if (uMsg == WOM_OPEN)
{
MessageBox(DlgMain,"WOM_OPEN","RTA",MB_OK);
OpenedOut = TRUE;
}
if (uMsg == WOM_CLOSE)
{
MessageBox(DlgMain,"WOM_CLOSE","RTA",MB_OK);
}
if (uMsg == WOM_DONE)
{
SetEvent(playDone);
}
}
//****************************************************************************
DWORD WINAPI OutThreadProc(LPVOID lpParam)
{
int wbo=0;
__1:WaitForSingleObject(playDone, INFINITE);
if (pWaveHeaderOut[wbo]->dwFlags & WHDR_DONE)
{
waveOutUnprepareHeader(hWaveOut, pWaveHeaderOut[wbo], sizeof(WAVEHDR));
pWaveHeaderOut[wbo]->dwFlags = 0;
regler_volume(Buffer, volume_general, 1000.0, TAILLE_BLOC * CANAUX); // appliquer le volume avant de l'envoyer
copier_buffer((short *)pWaveHeaderOut[wbo]->lpData, Buffer, TAILLE_BLOC * CANAUX); // reprendre bloc recu
waveOutPrepareHeader(hWaveOut, pWaveHeaderOut[wbo], sizeof(WAVEHDR));
waveOutWrite(hWaveOut, pWaveHeaderOut[wbo], sizeof(WAVEHDR));
__asm
{
mov eax, wbo
mov ebx, NB_BUFFER
inc eax
cmp eax, ebx
jb fin1
xor eax, eax
fin1: mov wbo, eax
}
}
__asm
{
jmp __1
}
return 0;
}
//****************************************************************************
int OuvrirPeripheriques()
{
int i;
WAVEFORMATEX WaveFormat;
WaveFormat.nChannels = CANAUX; // 1 pour mono 2 pour stereo
WaveFormat.wBitsPerSample = 16; // 16 bit
WaveFormat.nAvgBytesPerSec = SAMPLERATE * WaveFormat.nChannels * WaveFormat.wBitsPerSample/8; // nombre d'octets par seconde
WaveFormat.wFormatTag = 1; // 1 pour PCM
WaveFormat.nSamplesPerSec = SAMPLERATE; // frequence d'echantillonnage
WaveFormat.nBlockAlign = 1;
WaveFormat.cbSize = 0;
for(i=0; i<NB_BUFFER; i++)
{
pWaveHeaderIn[i] = (PWAVEHDR) malloc(sizeof(WAVEHDR));
}
InitializeCriticalSection(&CriticalSection);
if (waveInOpen(&hWaveIn, WAVE_MAPPER, &WaveFormat, (DWORD)waveInProc, (DWORD)&CriticalSection, CALLBACK_FUNCTION))
{
MessageBox(DlgMain,"Ouverture périphérique d'entrée impossible","RTA",MB_OK);
return 0;
}
for(i=0; i<NB_BUFFER; i++)
{
pWaveHeaderIn[i]->lpData = (LPSTR) malloc(BUFFER_SIZE); // reserve des octets et non des short
pWaveHeaderIn[i]->dwBufferLength = BUFFER_SIZE;
pWaveHeaderIn[i]->dwBytesRecorded = 0;
pWaveHeaderIn[i]->dwUser = 0;
pWaveHeaderIn[i]->dwFlags = 0;
pWaveHeaderIn[i]->dwLoops = 0;
pWaveHeaderIn[i]->lpNext = NULL;
pWaveHeaderIn[i]->reserved = 0;
}
for(i=0; i<NB_BUFFER; i++)
{
if (waveInPrepareHeader(hWaveIn, pWaveHeaderIn[i], sizeof(WAVEHDR)))
{
MessageBox(DlgMain,"Erreur waveInPrepareHeader","RTA",MB_OK);
return 0;
}
}
for(i=0; i<NB_BUFFER; i++)
{
if (waveInAddBuffer(hWaveIn, pWaveHeaderIn[i], sizeof(WAVEHDR)))
{
MessageBox(DlgMain,"Erreur AddBuffer","RTA",MB_OK);
return 0;
}
}
ResetEvent(recordDone);
if (waveInStart(hWaveIn))
{
waveInClose(hWaveIn);
}
//****
for(i=0; i<NB_BUFFER; i++)
{
pWaveHeaderOut[i] = (PWAVEHDR) malloc(sizeof(WAVEHDR));
}
if (waveOutOpen(&hWaveOut, WAVE_MAPPER, &WaveFormat, (DWORD)waveOutProc, 0L, CALLBACK_FUNCTION))
{
MessageBox(DlgMain,"Ouverture périphérique de sortie impossible","RTA",MB_OK);
return 0;
}
for(i=0; i<NB_BUFFER; i++)
{
pWaveHeaderOut[i]->lpData = (LPSTR) malloc(BUFFER_SIZE); // reserve des octets et non des short
pWaveHeaderOut[i]->dwBufferLength = BUFFER_SIZE;
pWaveHeaderOut[i]->dwBytesRecorded = 0;
pWaveHeaderOut[i]->dwUser = 0;
pWaveHeaderOut[i]->dwFlags = 0;
pWaveHeaderOut[i]->dwLoops = 0;
pWaveHeaderOut[i]->lpNext = NULL;
pWaveHeaderOut[i]->reserved = 0;
}
for(i=0; i<NB_BUFFER; i++)
{
if (waveOutPrepareHeader(hWaveOut, pWaveHeaderOut[i], sizeof(WAVEHDR)))
{
MessageBox(DlgMain,"Erreur PrepareHeader","RTA",MB_OK);
return 0;
}
}
for(i=0; i<NB_BUFFER; i++)
{
if (waveOutWrite(hWaveOut, pWaveHeaderOut[i], sizeof(WAVEHDR)))
{
MessageBox(DlgMain,"Erreur OutWrite","RTA",MB_OK);
return 0;
}
}
ResetEvent(playDone);
//*******
return 0;
}
//****************************************************************************
BOOL CALLBACK DlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
if (msg == WM_INITDIALOG)
{
DlgMain = hWnd;
char str[128];
SendDlgItemMessage(hWnd,IDC_SLIDER_VOLUME,TBM_SETRANGEMAX,0,1000);
SendDlgItemMessage(hWnd,IDC_SLIDER_VOLUME,TBM_SETRANGEMIN,0,0);
SendDlgItemMessage(hWnd,IDC_SLIDER_VOLUME,TBM_SETPOS,1,0); // volume general a fond
volume_general = 1000-SendDlgItemMessage(hWnd,IDC_SLIDER_VOLUME,TBM_GETPOS,0,0);
sprintf(str,"volume: %1.1f dB",20*log10(volume_general/1000));
SetDlgItemText(hWnd,IDC_STATIC_VOLUME,str);
return 0;
}
if (msg == WM_VSCROLL)
{
char str[128];
volume_general = 1000-SendDlgItemMessage(hWnd,IDC_SLIDER_VOLUME,TBM_GETPOS,0,0);
if (volume_general == 0)
{
sprintf(str,"volume: -oo");
SetDlgItemText(hWnd,IDC_STATIC_VOLUME,str);
return 0;
}
sprintf(str,"volume: %1.1f dB", 20*log10(volume_general/1000.0));
SetDlgItemText(hWnd,IDC_STATIC_VOLUME,str);
return 0;
}
if (msg == WM_COMMAND)
{
if (wParam == IDC_START)
{
if(OpenedIn == TRUE)
{
MessageBox(DlgMain,"Déjà ouvert","RTA",MB_OK);
return 0;
}
recordDone = CreateEvent(0, FALSE, FALSE, 0);
ResetEvent(recordDone);
RecordHandle = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE) InThreadProc, NULL, 0, &threadidIn);
playDone = CreateEvent(0, FALSE, FALSE, 0);
ResetEvent(playDone);
PlayHandle = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE) OutThreadProc, NULL, 0, &threadidOut);
OuvrirPeripheriques();
return 0;
}
if (wParam == IDCANCEL)
{
EndDialog(hWnd, 0);
return 0;
}
}
return 0;
}
//****************************************************************************
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
HANDLE hMutex;
hMutex = CreateMutex (NULL,FALSE, "RTA");
if (GetLastError() == ERROR_ALREADY_EXISTS)
{
MessageBox(NULL,"Cette application est déjà présente en mémoire !","WARNING",MB_OK|MB_ICONEXCLAMATION);
return 0;
}
InitCommonControls();
DialogBox(hInstance, MAKEINTRESOURCE(IDD_DIALOG1),HWND_DESKTOP,DlgProc);
return 0;
}
//*******************************************************
Sources du même auteur
Sources de la même categorie
Commentaires et avis
Discussions en rapport avec ce code source dans le forum
controle du volume audio général [ par roxanic ]
BonjourJe cherche a controler les bouton de volume.Pour le bouton Wave c'est OK. Mais je ne trouve pas le solution pour le curseur du volume général.M
Sélectionner la source audio... [ par MisteryX ]
Bonjour à tous,Si j'ai choisi un thème pour poster ma question c'est vraiment parce qu'il le fallait, donc je ne sais pas si j'ai fait le bon choix ??
Quelle librairi audio choisir [ par mmaximum ]
Salut à tous,Je cherche à faire un petit moteur de jeu 3D, mais je bloque sur le moteur sonore.Est-ce que quelqu'un connait un petit librairi audio po
volume d'un sample audio [ par oeildedinde ]
Salut, Je cherche une solution pour abaisser le niveau sonore d'un sample audio (dans un filtre directshow). J'ai testé 2 solutions qui me font appar
Convertir un fichier audio G711 en G729 [ par debass42 ]
Bonjour a toute la communauté. Je désire convertir un fichier audio G711 en un autre fichier audio G729... et inversement bien sur. Problème, je n'
Taquin - audio [ par julan2074 ]
Quelqu'un peut-il prendre le temps de m'aider à réaliser à jeu ? j'aimerai fabriqué un taquin... sonore : une fois le visuel correctement réalisé, une
communication entre le c et le c++ avec rs232 [ par bassemamara1984 ]
bonjour tout le monde je viens de commencer a programmer une interface pour envoyer des commandes a une carte electronique a microcontroleur cette car
moteur de recherche d'image par l'exemple [ par profwahnini ]
bonjour à tous,svp un coup de main pour un code source me permer de comparer les couleurs bleux et retourner le plus proche,merci à tous
Afficher les fréquence d'un fichier audio [ par PriMe2302 ]
Bonjour, je voudrais faire un programme permettant d'afficher les fréquences d'un fichier audio. Comment faire? Merci
[BAR]battlefield 3 - moteur de rendu réaliste [ par Actares1456 ]
Salut à tous ceux du CPPFrance! Bon. j'avoue que j'avais pas trop d'idée pour le nom du sujet, alors j'ai mis en gros que ce que je pensait se rapproc
|
Derniers Blogs
TECHDAYS PARIS 2012 : SESSION PLEINIèRE JOUR 3TECHDAYS PARIS 2012 : SESSION PLEINIèRE JOUR 3 par ROMELARD Fabrice
Speaker: Bernard Ourghanlian Cette session est comme chaque jour transmise en live par BrainSonic, et j'ai donc suivi cette troisième pleinière par ce moyen sur mon iPad . Elle est dédiée comme chaque année à la mise en perspective de l'é...
Cliquez pour lire la suite de l'article par ROMELARD Fabrice MISHRA READER : UN LECTEUR RSS TRèS ZUNE STYLE EN OPEN SOURCE !MISHRA READER : UN LECTEUR RSS TRèS ZUNE STYLE EN OPEN SOURCE ! par Vko
Hier durant une session dédiée aux Techdays 2012, j'ai eu le plaisir d'annoncer la sortie de la Béta 2 de Mishra Reader. C'est quoi ? Pour les utilisateurs, c'est une vraie expérience de lecture de flux RSS sur Windows. Rien à voir avec les produit...
Cliquez pour lire la suite de l'article par Vko [FRAMEWORK 4] LES TASKS ET LE THREAD UI[FRAMEWORK 4] LES TASKS ET LE THREAD UI par fathi
Je viens de passer quelques temps au TechDay's et j'ai pu voir pas mal de session intéressante. Par contre une chose m'a un peu étonné lors de certaines de ces sessions qui abordaient les améliorations du framework .NET (donc le 4.5) : en gros, bea...
Cliquez pour lire la suite de l'article par fathi WORKFLOW FOUNDATION 3 A UN PIED DANS LA TOMBEWORKFLOW FOUNDATION 3 A UN PIED DANS LA TOMBE par JeremyJeanson
Depuis déjà un an, je conseille vivement les utilisateurs de Workflow Foundation 3 à migrer vers la version 4. L'information qui va suivre ne devrait donc pas trop prendre au dépourvu les personnes qui m'ont suivi. Je profite de ce poste, pour faire le re...
Cliquez pour lire la suite de l'article par JeremyJeanson TECHDAYS PARIS 2012 : NOUVELLES TENDANCES DU POSTE DE TRAVAIL - BRING YOUR OWN PCTECHDAYS PARIS 2012 : NOUVELLES TENDANCES DU POSTE DE TRAVAIL - BRING YOUR OWN PC par ROMELARD Fabrice
Speakers: Thierry Rapatout, Antoine Petit et Xavier Trebbia Cette session entre dans le cadre des RDV Décideurs des TechDays 2012, elle est liée à la consumérisation de l'IT et la mise en place du "DeskTop as a Service" dans de plus en ...
Cliquez pour lire la suite de l'article par ROMELARD Fabrice
Logiciels
Academy System (17.2.1.0)ACADEMY SYSTEM (17.2.1.0)Logiciel de gestion des établissements.
- élèves/étudiants (inscription, dossier, absence...)
-... Cliquez pour télécharger Academy System Easy-Planning (1.0.0.1)EASY-PLANNING (1.0.0.1)Basé sur les mêmes principes que MyPlanning, Easy-Planning permet de créer des plannings sous la ... Cliquez pour télécharger Easy-Planning COLLECTOR PLUS (3.00B)COLLECTOR PLUS (3.00B)COLLECTOR PLUS version 3.00B est un logiciel utilisant une base de données alimentée par :
- L... Cliquez pour télécharger COLLECTOR PLUS PONAMEDIA PREMIUM - HELLLOOO FLASH DEMO (V7.4)PONAMEDIA PREMIUM - HELLLOOO FLASH DEMO (V7.4)PONAMEDIA TV DEVIENS HELLLOOO FLASH
LA TV SUR VOTRE ORDINATEUR.
Toute une plateforme Multi... Cliquez pour télécharger PONAMEDIA PREMIUM - HELLLOOO FLASH DEMO LettresFaciles 2011 (8.0.0.1)LETTRESFACILES 2011 (8.0.0.1)LettresFaciles est un logiciel facilitant la création et la rédaction de lettres types.
Son inte... Cliquez pour télécharger LettresFaciles 2011
|