From cb0d6f8f034f7818b91b73359f4ebe9eec937927 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Mon, 28 Aug 2006 14:45:20 +0000 Subject: Fix blocks crashes on WIN32 - audio buffer too small git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5374 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- test/blocks.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/blocks.cxx b/test/blocks.cxx index bafaf57fd..2ae7bbf79 100644 --- a/test/blocks.cxx +++ b/test/blocks.cxx @@ -236,7 +236,7 @@ BlockSound::BlockSound() { format.nBlockAlign = 4; format.wBitsPerSample = 16; - data_handle = GlobalAlloc(GMEM_MOVEABLE | GMEM_SHARE, format.nSamplesPerSec / 5); + data_handle = GlobalAlloc(GMEM_MOVEABLE | GMEM_SHARE, format.nSamplesPerSec * 4); if (!data_handle) return; data_ptr = (LPSTR)GlobalLock(data_handle); @@ -795,6 +795,7 @@ BlockWindow::help_cb(Fl_Widget *wi, BlockWindow *bw) { void BlockWindow::init() { count_ = 0; + help_ = false; interval_ = -1.0; level_ = 1; num_colors_ = 3; -- cgit v1.2.3