Author: dgorbachev
Date: Thu Dec 3 19:44:27 2009
New Revision: 44384
URL:
http://svn.reactos.org/svn/reactos?rev=44384&view=rev
Log:
SndRec32 patch by Marco Pagliaricci, bug #4978.
Added:
trunk/reactos/base/applications/sndrec32/audio_api.hpp (with props)
Modified:
trunk/reactos/base/applications/sndrec32/audio_def.hpp
trunk/reactos/base/applications/sndrec32/audio_format.hpp
trunk/reactos/base/applications/sndrec32/audio_membuffer.cpp
trunk/reactos/base/applications/sndrec32/audio_producer.cpp
trunk/reactos/base/applications/sndrec32/audio_resampler_acm.cpp
trunk/reactos/base/applications/sndrec32/audio_waveout.cpp
trunk/reactos/base/applications/sndrec32/resource.h
trunk/reactos/base/applications/sndrec32/sndrec32.cpp
trunk/reactos/base/applications/sndrec32/sndrec32.h
trunk/reactos/base/applications/sndrec32/sndrec32.rc
trunk/reactos/base/applications/sndrec32/stdafx.h
Added: trunk/reactos/base/applications/sndrec32/audio_api.hpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/sndrec32…
==============================================================================
--- trunk/reactos/base/applications/sndrec32/audio_api.hpp (added)
+++ trunk/reactos/base/applications/sndrec32/audio_api.hpp [iso-8859-1] Thu Dec 3
19:44:27 2009
@@ -1,0 +1,15 @@
+#ifndef __AUDIO_API__
+#define __AUDIO_API__
+
+#include "audio_def.hpp"
+
+#include "audio_format.hpp"
+#include "audio_membuffer.hpp"
+#include "audio_producer.hpp"
+#include "audio_receiver.hpp"
+#include "audio_resampler_acm.hpp"
+#include "audio_wavein.hpp"
+#include "audio_waveout.hpp"
+
+
+#endif
Propchange: trunk/reactos/base/applications/sndrec32/audio_api.hpp
------------------------------------------------------------------------------
svn:eol-style = native
Modified: trunk/reactos/base/applications/sndrec32/audio_def.hpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/sndrec32…
==============================================================================
--- trunk/reactos/base/applications/sndrec32/audio_def.hpp [iso-8859-1] (original)
+++ trunk/reactos/base/applications/sndrec32/audio_def.hpp [iso-8859-1] Thu Dec 3
19:44:27 2009
@@ -9,10 +9,13 @@
//
#define _AUDIO_DEFAULT_FORMAT A44100_16BIT_STEREO
+
#define _AUDIO_DEFAULT_WAVEINBUFFERS 8
#define _AUDIO_DEFAULT_WAVEINBUFSECS 0.1f
-#define _AUDIO_DEFAULT_WAVEOUTBUFFERS 8
-#define _AUDIO_DEFAULT_WAVEOUTBUFSECS 0.1f
+
+#define _AUDIO_DEFAULT_WAVEOUTBUFFERS 2
+#define _AUDIO_DEFAULT_WAVEOUTBUFSECS 1.0f
+
#define _AUDIO_DEFAULT_BUFSECS 1.0f
@@ -29,6 +32,9 @@
#include <windows.h>
#include <mmsystem.h> //Windows MultiMedia (WINMM) audio apis
#include <mmreg.h> //codecs stuff
-#include <Msacm.h> //codecs stuff
+#include <msacm.h> //codecs stuff
+
+//#pragma comment(lib, "winmm.lib")
+//#pragma comment(lib, "msacm32.lib")
#endif //ifdef _AUDIO_DEF__H_
Modified: trunk/reactos/base/applications/sndrec32/audio_format.hpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/sndrec32…
==============================================================================
--- trunk/reactos/base/applications/sndrec32/audio_format.hpp [iso-8859-1] (original)
+++ trunk/reactos/base/applications/sndrec32/audio_format.hpp [iso-8859-1] Thu Dec 3
19:44:27 2009
@@ -122,6 +122,13 @@
}
+ unsigned int bytes_in_samples( unsigned int samples ) const
+ {
+
+ return (( samples * ( bits_psample / 8 )) * chan );
+
+ }
+
};
Modified: trunk/reactos/base/applications/sndrec32/audio_membuffer.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/sndrec32…
==============================================================================
--- trunk/reactos/base/applications/sndrec32/audio_membuffer.cpp [iso-8859-1] (original)
+++ trunk/reactos/base/applications/sndrec32/audio_membuffer.cpp [iso-8859-1] Thu Dec 3
19:44:27 2009
@@ -12,6 +12,13 @@
_AUDIO_NAMESPACE_START_
+
+
+//////////////////////////////////////
+/////// Protected Functions /////////
+//////////////////////////////////////
+
+
void
audio_membuffer::alloc_mem_( unsigned int bytes )
{
Modified: trunk/reactos/base/applications/sndrec32/audio_producer.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/sndrec32…
==============================================================================
--- trunk/reactos/base/applications/sndrec32/audio_producer.cpp [iso-8859-1] (original)
+++ trunk/reactos/base/applications/sndrec32/audio_producer.cpp [iso-8859-1] Thu Dec 3
19:44:27 2009
@@ -6,7 +6,6 @@
* PROGRAMMERS: Marco Pagliaricci <ms_blue (at) hotmail (dot) it>
*/
-
-#include "StdAfx.h"
+#include "stdafx.h"
#include "audio_producer.hpp"
Modified: trunk/reactos/base/applications/sndrec32/audio_resampler_acm.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/sndrec32…
==============================================================================
--- trunk/reactos/base/applications/sndrec32/audio_resampler_acm.cpp [iso-8859-1]
(original)
+++ trunk/reactos/base/applications/sndrec32/audio_resampler_acm.cpp [iso-8859-1] Thu Dec
3 19:44:27 2009
@@ -108,7 +108,7 @@
if ( err != MMSYSERR_NOERROR )
{
//TODO: throw error
- printf("acmOpen error: %i\n", err);
+ MessageBox( 0, _T("acmOpen error: %i"), _T("ERROR"), MB_ICONERROR
);
}
@@ -138,7 +138,8 @@
if ( err != MMSYSERR_NOERROR )
{
//TODO: throw error
- printf("acmSize error\n");
+ MessageBox( 0, _T("acmStreamSize error"), _T("ERROR"), MB_ICONERROR
);
+
}
@@ -178,7 +179,9 @@
if ( err != MMSYSERR_NOERROR )
{
//TODO: throw error
- printf("prep. header error\n");
+ MessageBox( 0, _T("acmStreamPrepareHeader error"), _T("ERROR"),
MB_ICONERROR );
+
+
}
@@ -243,6 +246,8 @@
//TODO: throw error
+ MessageBox( 0, _T("acmStreamUnPrepareHeader error"), _T("ERROR"),
MB_ICONERROR );
+
}
}
@@ -280,6 +285,9 @@
//TODO: throw error!
+
+ MessageBox( 0, _T("acmStreamClose error"), _T("ERROR"),
MB_ICONERROR );
+
}
@@ -357,7 +365,8 @@
if ( err != MMSYSERR_NOERROR )
{
//TODO: throw error
- printf("acm convert error\n");
+ MessageBox( 0, _T("acmStreamConvert error"), _T("ERROR"),
MB_ICONERROR );
+
}
@@ -369,7 +378,7 @@
while(( ACMSTREAMHEADER_STATUSF_DONE & acm_header.fdwStatus ) == 0 );
- printf("Processed successfully %lu bytes of audio.\n",
acm_header.cbDstLengthUsed );
+ //printf("Processed successfully %i bytes of audio.\n",
acm_header.cbDstLengthUsed );
Modified: trunk/reactos/base/applications/sndrec32/audio_waveout.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/sndrec32…
==============================================================================
--- trunk/reactos/base/applications/sndrec32/audio_waveout.cpp [iso-8859-1] (original)
+++ trunk/reactos/base/applications/sndrec32/audio_waveout.cpp [iso-8859-1] Thu Dec 3
19:44:27 2009
@@ -531,7 +531,7 @@
// Reads the audio from the start.
//
- audio_buf.set_position_start();
+ //audio_buf.set_position_start();
@@ -643,7 +643,7 @@
if ( err != MMSYSERR_NOERROR )
{
- MessageBox(0, _T("err waveout reset.\n"),_T("ERROR"), 0);
+ MessageBox(0, _T("err WaveOutReset.\n"),_T("ERROR"), 0);
//TODO: throw error
}
Modified: trunk/reactos/base/applications/sndrec32/resource.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/sndrec32…
==============================================================================
--- trunk/reactos/base/applications/sndrec32/resource.h [iso-8859-1] (original)
+++ trunk/reactos/base/applications/sndrec32/resource.h [iso-8859-1] Thu Dec 3 19:44:27
2009
@@ -3,12 +3,14 @@
// Used by reactOS_sndrec32.rc
//
#define IDC_MYICON 2
+#define IDB_BITMAP2_STOP_DIS 8
#define IDD_REACTOS_SNDREC32_DIALOG 102
#define IDS_APP_TITLE 103
#define IDD_ABOUTBOX 103
#define IDM_ABOUT 104
#define IDI_REACTOS_SNDREC32 107
#define IDI_REACTOS_SNDREC32LL 107
+#define IDI_SNDREC32 107
#define IDI_SMALL 108
#define IDC_REACTOS_SNDREC32 109
#define IDR_MAINFRAME 128
@@ -21,6 +23,11 @@
#define IDB_BITMAP2_REC 137
#define IDI_ICON1 138
#define IDR_MENU1 139
+#define IDI_ICON2 140
+#define IDB_BITMAP2_END_DIS 141
+#define IDB_BITMAP2_PLAY_DIS 142
+#define IDB_BITMAP2_REC_DIS 143
+#define IDB_BITMAP2_START_DIS 144
#define ID_FILE_NEW 32771
#define ID_FILE_OPEN 32772
#define ID_FILE_SAVE 32773
@@ -36,7 +43,7 @@
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NO_MFC 1
-#define _APS_NEXT_RESOURCE_VALUE 140
+#define _APS_NEXT_RESOURCE_VALUE 145
#define _APS_NEXT_COMMAND_VALUE 32779
#define _APS_NEXT_CONTROL_VALUE 1000
#define _APS_NEXT_SYMED_VALUE 110
Modified: trunk/reactos/base/applications/sndrec32/sndrec32.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/sndrec32…
==============================================================================
--- trunk/reactos/base/applications/sndrec32/sndrec32.cpp [iso-8859-1] (original)
+++ trunk/reactos/base/applications/sndrec32/sndrec32.cpp [iso-8859-1] Thu Dec 3 19:44:27
2009
@@ -11,8 +11,10 @@
#include "stdafx.h"
#include "sndrec32.h"
-#include "kkaudio.hpp"
-
+
+
+
+//#pragma comment(lib, "comctl32.lib")
HINSTANCE hInst;
@@ -31,6 +33,7 @@
HWND slider;
HWND buttons[5];
HBITMAP butbmps[5];
+HBITMAP butbmps_dis[5];
WNDPROC buttons_std_proc;
BOOL butdisabled[5];
@@ -42,19 +45,15 @@
WORD slider_min;
WORD slider_max;
-long long samples_max;
+DWORD samples_max;
OPENFILENAME ofn;
TCHAR file_path[MAX_PATH];
BOOL path_set;
-using snd::audio_membuffer;
-using snd::audio_wavein;
-using snd::audio_waveout;
-
-audio_membuffer * AUD_BUF;
-audio_waveout * AUD_OUT;
-audio_wavein * AUD_IN;
+snd::audio_membuffer * AUD_BUF;
+snd::audio_waveout * AUD_OUT;
+snd::audio_wavein * AUD_IN;
BOOL s_recording;
@@ -88,9 +87,11 @@
butbmps[3] = LoadBitmap( hInstance, MAKEINTRESOURCE( IDB_BITMAP2_STOP ));
butbmps[4] = LoadBitmap( hInstance, MAKEINTRESOURCE( IDB_BITMAP2_REC ));
-
-
-
+ butbmps_dis[0] = LoadBitmap( hInstance, MAKEINTRESOURCE( IDB_BITMAP2_START_DIS ));
+ butbmps_dis[1] = LoadBitmap( hInstance, MAKEINTRESOURCE( IDB_BITMAP2_END_DIS ));
+ butbmps_dis[2] = LoadBitmap( hInstance, MAKEINTRESOURCE( IDB_BITMAP2_PLAY_DIS ));
+ butbmps_dis[3] = LoadBitmap( hInstance, MAKEINTRESOURCE( IDB_BITMAP2_STOP_DIS ));
+ butbmps_dis[4] = LoadBitmap( hInstance, MAKEINTRESOURCE( IDB_BITMAP2_REC_DIS ));
snd::audio_membuffer AUD_buffer( snd::A44100_16BIT_STEREO );
@@ -123,10 +124,16 @@
samples_max = AUD_buffer.total_samples();
-
-
- LoadString(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING);
- LoadString(hInstance, IDC_REACTOS_SNDREC32, szWindowClass, MAX_LOADSTRING);
+ LoadString(hInstance,
+ IDS_APP_TITLE, szTitle, MAX_LOADSTRING);
+
+
+
+ LoadString(hInstance,
+ IDC_REACTOS_SNDREC32, szWindowClass, MAX_LOADSTRING);
+
+
+
MyRegisterClass(hInstance);
@@ -136,7 +143,8 @@
return FALSE;
}
- hAccelTable = LoadAccelerators(hInstance, MAKEINTRESOURCE(IDC_REACTOS_SNDREC32));
+ hAccelTable = LoadAccelerators(hInstance,
+ MAKEINTRESOURCE( IDC_REACTOS_SNDREC32 ));
@@ -188,12 +196,12 @@
wcex.cbClsExtra = 0;
wcex.cbWndExtra = 0;
wcex.hInstance = hInstance;
- wcex.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_REACTOS_SNDREC32LL));
+ wcex.hIcon = LoadIcon( hInstance, MAKEINTRESOURCE( IDI_SNDREC32 ));
wcex.hCursor = LoadCursor(NULL, IDC_ARROW);
wcex.hbrBackground = (HBRUSH)(16);
wcex.lpszMenuName = MAKEINTRESOURCE(IDR_MENU1);
wcex.lpszClassName = szWindowClass;
- wcex.hIconSm = LoadIcon(wcex.hInstance, MAKEINTRESOURCE(IDI_REACTOS_SNDREC32LL));
+ wcex.hIconSm = LoadIcon( wcex.hInstance, MAKEINTRESOURCE( IDI_SNDREC32 ));
return RegisterClassEx(&wcex);
@@ -284,9 +292,6 @@
}
- butdisabled[ i ] = TRUE;
-
-
//
// Realize the button bmp image
@@ -294,8 +299,9 @@
SendMessage(buttons[i], BM_SETIMAGE, ( WPARAM )IMAGE_BITMAP, ( LPARAM
)butbmps[i]);
-
UpdateWindow( buttons[i] );
+
+ disable_but( i );
}
@@ -325,8 +331,6 @@
// Sets slider limits
//
- //slider_min = 0;
- //slider_max = 100;
SendMessage(
slider,
@@ -338,12 +342,9 @@
UpdateWindow( slider );
-
- //
- // Enables REC button.
- //
-
- butdisabled[ BUTREC_ID ] = FALSE;
+ enable_but( BUTREC_ID );
+
+ EnableWindow( slider, FALSE );
@@ -367,7 +368,24 @@
case SB_PAGERIGHT:
case SB_PAGELEFT:
case TB_THUMBTRACK:
+
+
+ //
+ // If the user touch the slider bar,
+ // set the audio start position properly
+ //
+
+
slider_pos = SendMessage(slider, TBM_GETPOS, 0, 0);
+
+
+ AUD_BUF->set_position(
+ AUD_BUF->audinfo().bytes_in_samples(
+ (( slider_pos * samples_max ) / slider_max )
+ )
+ );
+
+
break;
}
@@ -407,16 +425,26 @@
AUD_BUF->reset();
- butdisabled[ BUTREC_ID ] = FALSE;
- butdisabled[ BUTSTART_ID ] = TRUE;
- butdisabled[ BUTEND_ID ] = TRUE;
- butdisabled[ BUTSTOP_ID ] = TRUE;
- butdisabled[ BUTPLAY_ID ] = TRUE;
+ enable_but( BUTREC_ID );
+ disable_but( BUTSTART_ID );
+ disable_but( BUTEND_ID );
+ disable_but( BUTSTOP_ID );
+ disable_but( BUTPLAY_ID );
+
samples_max = AUD_BUF->total_samples();
slider_pos = 0;
SendMessage(slider, TBM_SETPOS, (WPARAM) TRUE, (LPARAM) slider_pos);
+
+ EnableMenuItem( GetMenu( hWnd ), ID_FILE_SAVEAS, MF_GRAYED );
+ EnableMenuItem( GetMenu( hWnd ), ID_FILE_SAVE, MF_GRAYED );
+
+ isnew = TRUE;
+
+ ZeroMemory( file_path, MAX_PATH );
+
+ EnableWindow( slider, FALSE );
}
@@ -442,6 +470,11 @@
if( GetOpenFileName( &ofn ))
{
open_wav( file_path );
+ EnableMenuItem( GetMenu( hWnd ), ID_FILE_SAVE, MF_ENABLED );
+ EnableMenuItem( GetMenu( hWnd ), ID_FILE_SAVEAS, MF_ENABLED );
+
+ EnableWindow( slider, TRUE );
+
}
break;
@@ -471,9 +504,9 @@
if ( GetSaveFileName ( &ofn ))
{
-
write_wav( file_path );
+ EnableMenuItem( GetMenu( hWnd ), ID_FILE_SAVE, MF_ENABLED );
}
break;
@@ -488,22 +521,29 @@
//
case BUTSTART_ID:
- Beep(200,200);
+
+ AUD_BUF->set_position_start();
+
+ slider_pos = 0;
+
+ SendMessage( slider, TBM_SETPOS, (WPARAM) TRUE, (LPARAM) slider_pos );
+
break;
case BUTEND_ID:
- Beep(300,200);
+ //Beep(300,200);
break;
case BUTPLAY_ID:
AUD_OUT->play();
- butdisabled[ BUTSTART_ID ] = TRUE;
- butdisabled[ BUTEND_ID ] = TRUE;
- butdisabled[ BUTREC_ID ] = TRUE;
- butdisabled[ BUTPLAY_ID ] = TRUE;
+ disable_but( BUTSTART_ID );
+ disable_but( BUTEND_ID );
+ disable_but( BUTREC_ID );
+ disable_but( BUTPLAY_ID );
+
SetTimer( hWnd, 1, 250, 0 );
@@ -516,11 +556,6 @@
AUD_IN->stop_recording();
- butdisabled[ BUTSTART_ID ] = FALSE;
- butdisabled[ BUTEND_ID ] = FALSE;
- butdisabled[ BUTREC_ID ] = FALSE;
- butdisabled[ BUTPLAY_ID ] = FALSE;
-
//
@@ -535,14 +570,25 @@
EnableMenuItem((HMENU)IDR_MENU1, ID_FILE_SAVEAS, MF_ENABLED );
+
+ enable_but( BUTSTART_ID );
+ enable_but( BUTEND_ID );
+ enable_but( BUTREC_ID );
+ enable_but( BUTPLAY_ID );
+
+ EnableMenuItem( GetMenu( hWnd ), ID_FILE_SAVEAS, MF_ENABLED );
+ EnableWindow( slider, TRUE );
+
+
+
} else {
AUD_OUT->pause();
- butdisabled[ BUTSTART_ID ] = FALSE;
- butdisabled[ BUTEND_ID ] = FALSE;
- butdisabled[ BUTREC_ID ] = FALSE;
- butdisabled[ BUTPLAY_ID ] = FALSE;
+ enable_but( BUTSTART_ID );
+ enable_but( BUTEND_ID );
+ enable_but( BUTREC_ID );
+ enable_but( BUTPLAY_ID );
}
@@ -558,15 +604,16 @@
AUD_IN->start_recording();
- butdisabled[ BUTSTOP_ID ] = FALSE;
- butdisabled[ BUTSTART_ID ] = TRUE;
- butdisabled[ BUTEND_ID ] = TRUE;
- butdisabled[ BUTREC_ID ] = TRUE;
- butdisabled[ BUTPLAY_ID ] = TRUE;
-
- isnew = FALSE;
-
-
+ enable_but( BUTSTOP_ID );
+
+ disable_but( BUTSTART_ID );
+ disable_but( BUTEND_ID );
+ disable_but( BUTREC_ID );
+ disable_but( BUTPLAY_ID );
+
+ isnew = FALSE;
+
+ EnableWindow( slider, FALSE );
SetTimer( hWnd, 1, 150, 0 );
@@ -586,7 +633,7 @@
KillTimer(hWnd, 1);
slider_pos = 0;
- butdisabled[ BUTPLAY_ID ] = FALSE;
+ enable_but( BUTPLAY_ID );
stopped_flag = FALSE;
}
@@ -613,6 +660,61 @@
return DefWindowProc(hWnd, message, wParam, lParam);
}
return 0;
+}
+
+
+
+
+
+void l_play_finished ( void )
+{
+
+ stopped_flag = true;
+
+
+ enable_but( BUTSTART_ID );
+ enable_but( BUTEND_ID );
+ enable_but( BUTREC_ID );
+ enable_but( BUTPLAY_ID );
+
+
+
+}
+
+void l_audio_arrival ( unsigned int samples_arrival )
+{
+
+
+ slider_pos += (DWORD) (( slider_max * samples_arrival ) / samples_max );
+
+
+}
+
+void l_buffer_resized ( unsigned int new_size )
+{
+
+
+
+
+
+}
+
+VOID enable_but( DWORD id )
+{
+
+ butdisabled[ id ] = FALSE;
+
+ SendMessage(buttons[ id ], BM_SETIMAGE, ( WPARAM )IMAGE_BITMAP, ( LPARAM )butbmps[ id
]);
+
+
+}
+VOID disable_but( DWORD id )
+{
+
+ butdisabled[ id ] = TRUE;
+
+ SendMessage(buttons[ id ], BM_SETIMAGE, ( WPARAM )IMAGE_BITMAP, ( LPARAM )butbmps_dis[
id ]);
+
}
@@ -663,14 +765,9 @@
if ( !b )
{
- DWORD t = GetLastError();
- TCHAR p[100];
- wsprintf(p,TEXT("Errore n: %i"),t);
-
MessageBox(
main_win,
- //TEXT("Cannot read RIFF header."),
- p,
+ TEXT("Cannot read RIFF header."),
TEXT("ERROR"),
MB_OK|MB_ICONERROR
);
@@ -721,25 +818,8 @@
bytes_recorded_in_wav = r.chunksize - 36;
- /*
- unsigned char * gg = (unsigned char*)&bytes_recorded_in_wav;
-
- gg[0] = gg[3];
- gg[1] = gg[2];
-
- bytes_recorded_in_wav = (DWORD) *gg;
-
-
-
- TCHAR p [100];
- wsprintf(p,TEXT("bytes: %i"),bytes_recorded_in_wav);
- MessageBox(0,p,0,0);
-
- */
-
if ( bytes_recorded_in_wav == 0 )
{
-
MessageBox(
main_win,
TEXT("Cannot read file. No audio data."),
@@ -795,12 +875,11 @@
CloseHandle( file );
- butdisabled[ BUTPLAY_ID ] = FALSE;
- butdisabled[ BUTSTOP_ID ] = FALSE;
- butdisabled[ BUTEND_ID ] = FALSE;
- butdisabled[ BUTSTART_ID ] = FALSE;
- butdisabled[ BUTREC_ID ] = FALSE;
-
+ enable_but( BUTPLAY_ID );
+ enable_but( BUTSTOP_ID );
+ enable_but( BUTSTART_ID );
+ enable_but( BUTEND_ID );
+ enable_but( BUTREC_ID );
samples_max = AUD_BUF->samples_received();
@@ -994,49 +1073,3 @@
return TRUE;
}
-
-
-
-void l_play_finished ( void )
-{
-
- stopped_flag = true;
-
-
-
-}
-
-void l_audio_arrival ( unsigned int samples_arrival )
-{
-
-
- slider_pos += (DWORD) (( slider_max * samples_arrival ) / samples_max );
-
-
-}
-
-void l_buffer_resized ( unsigned int new_size )
-{
-
-
-
-
-
-}
-
-VOID enable_but( DWORD id )
-{
-
-
-
-
-
-}
-VOID disable_but( DWORD id )
-{
-
-
-
-}
-
-
Modified: trunk/reactos/base/applications/sndrec32/sndrec32.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/sndrec32…
==============================================================================
--- trunk/reactos/base/applications/sndrec32/sndrec32.h [iso-8859-1] (original)
+++ trunk/reactos/base/applications/sndrec32/sndrec32.h [iso-8859-1] Thu Dec 3 19:44:27
2009
@@ -1,6 +1,7 @@
#pragma once
#include "resource.h"
+#include "audio_api.hpp"
Modified: trunk/reactos/base/applications/sndrec32/sndrec32.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/sndrec32…
==============================================================================
--- trunk/reactos/base/applications/sndrec32/sndrec32.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/sndrec32/sndrec32.rc [iso-8859-1] Thu Dec 3 19:44:27
2009
@@ -33,8 +33,7 @@
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
-IDI_REACTOS_SNDREC32LL ICON "reactOS_sndrec32.ico"
-IDI_SMALL ICON "small.ico"
+IDI_SNDREC32 ICON "reactOS_sndrec32.ico"
/////////////////////////////////////////////////////////////////////////////
//
@@ -125,6 +124,11 @@
IDB_BITMAP2_PLAY BITMAP "but_play.bmp"
IDB_BITMAP2_STOP BITMAP "but_stop.bmp"
IDB_BITMAP2_REC BITMAP "but_rec.bmp"
+IDB_BITMAP2_END_DIS BITMAP "but_end_dis.bmp"
+IDB_BITMAP2_PLAY_DIS BITMAP "but_play_dis.bmp"
+IDB_BITMAP2_REC_DIS BITMAP "but_rec_dis.bmp"
+IDB_BITMAP2_START_DIS BITMAP "but_start_dis.bmp"
+IDB_BITMAP2_STOP_DIS BITMAP "but_stop_dis.bmp"
/////////////////////////////////////////////////////////////////////////////
//
@@ -138,7 +142,7 @@
MENUITEM "New", ID_NEW
MENUITEM "Open...", ID_FILE_OPEN
MENUITEM "Save", ID_FILE_SAVE, GRAYED
- MENUITEM "Save As...", ID_FILE_SAVEAS
+ MENUITEM "Save As...", ID_FILE_SAVEAS, GRAYED
MENUITEM SEPARATOR
MENUITEM "Exit", ID_EXIT
END
Modified: trunk/reactos/base/applications/sndrec32/stdafx.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/sndrec32…
==============================================================================
--- trunk/reactos/base/applications/sndrec32/stdafx.h [iso-8859-1] (original)
+++ trunk/reactos/base/applications/sndrec32/stdafx.h [iso-8859-1] Thu Dec 3 19:44:27
2009
@@ -11,7 +11,7 @@
// File di intestazione di Windows:
#include <windows.h>
#include <commctrl.h>
-#include <Commdlg.h>
+#include <commdlg.h>
// File di intestazione Runtime C
#include <stdlib.h>