3rd Tuesday of the month. 7:30PM - C/C++ Group, SPRS
Welcome to the C++ Users Group. This group is a "Special Interest Group" of the ACGNJ devoted to discussing programming languages in general and C, C++, and C++ for Windows programming in particular. Each month a small but hopefully useful program (complete with source code) is presented for discussion.
Object of the Pink Noise Player Program: To present a small utility which plays Pink Noise from the computer sound system. Pink Noise is "1/f noise," with a frequency distribution of 1/f, or a 3 dB per octave roll-off. It is generally considered the kind of noise most prevalent in nature. The sample covers the frequency range of 20 to 20,000 Hertz.At the meeting on Tuesday night we will be discussing the utility and the source code.
SAMPLE CODE =========== BEGIN_MESSAGE_MAP(CPinkDlg, CDialog) //{{AFX_MSG_MAP(CPinkDlg) ON_WM_SYSCOMMAND() ON_WM_PAINT() ON_WM_QUERYDRAGICON() ON_BN_CLICKED(IDC_SOUND1, OnSound1) ON_WM_HSCROLL() ON_WM_TIMER() ON_WM_DESTROY() //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CPinkDlg message handlers BOOL CPinkDlg::OnInitDialog() { CDialog::OnInitDialog(); // Add "About..." menu item to system menu. // IDM_ABOUTBOX must be in the system command range. ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); ASSERT(IDM_ABOUTBOX < 0xF000); CMenu* pSysMenu = GetSystemMenu(FALSE); if (pSysMenu != NULL) { CString strAboutMenu; strAboutMenu.LoadString(IDS_ABOUTBOX); if (!strAboutMenu.IsEmpty()) { pSysMenu->AppendMenu(MF_SEPARATOR); pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); } } SetIcon(m_hIcon, TRUE); // Set big icon SetIcon(m_hIcon, FALSE); // Set small icon // TODO: Add extra initialization here // int code = waveOutGetVolume( HWAVEOUT hwo, LPDWORD pdwVolume ); unsigned long Vol; RECT rr; GetClientRect(&rr); GetDlgItem(IDC_STATUS)->SetWindowPos(0,0,0,rr.right,rr.bottom,SWP_NOZORDER); int code = waveOutGetVolume(0, &Vol ); LeftChanFiltered = 0; LeftChanVol = (Vol & 0xFFFF) >> 8; m_Slider.SetRange(0, 255); m_Slider.SetPos(LeftChanVol); m_Slider.SetTicFreq(51); LeftChanVol = m_Slider.GetPos(); SetTimer(1, 20, NULL); return TRUE; // return TRUE unless you set the focus to a control }
September 2005 C/C++ Meeting Random Access Notes ================================================= ASUS RARITAN CENTER A-BIT SEPT 24,25 MATSONIC COMPUTER SHOW MACH SPEED PC POWER AND COOLING