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
This commit is contained in:
Michael R Sweet 2006-08-28 14:45:20 +00:00
parent ed0ce675d1
commit cb0d6f8f03
3 changed files with 14 additions and 2 deletions

View File

@ -1583,7 +1583,7 @@ void fl_free_fonts(void)
s = fl_fonts + i;
for (f=s->first; f; f=ff) {
ff = f->next;
delete(f);
delete f;
s->first = ff;
}
}

View File

@ -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;

View File

@ -143,6 +143,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo", "demo.vcproj", "{094
{9F3F86DA-3CC5-481F-8201-166933B5C8FF} = {9F3F86DA-3CC5-481F-8201-166933B5C8FF}
{1CD667DD-E7AE-4F36-A1F7-F41FB59786BE} = {1CD667DD-E7AE-4F36-A1F7-F41FB59786BE}
{8B25CCE0-0988-4999-AE65-5A5EE31BB44D} = {8B25CCE0-0988-4999-AE65-5A5EE31BB44D}
{301A1EE3-8AF8-4EB8-9004-473B74E4083C} = {301A1EE3-8AF8-4EB8-9004-473B74E4083C}
{F658ABE4-7FE1-4404-9B7C-55E0D660F1B3} = {F658ABE4-7FE1-4404-9B7C-55E0D660F1B3}
{AA0ED6EA-2DA3-4486-AFBD-76CC9D206A1E} = {AA0ED6EA-2DA3-4486-AFBD-76CC9D206A1E}
{122160ED-446E-4B15-8CB4-A2058DC7269A} = {122160ED-446E-4B15-8CB4-A2058DC7269A}
@ -451,6 +452,12 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "input_choice", "input_choic
{E070AAFC-9D03-41A3-BC7D-30887EA0D50F} = {E070AAFC-9D03-41A3-BC7D-30887EA0D50F}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "blocks", "blocks.vcproj", "{301A1EE3-8AF8-4EB8-9004-473B74E4083C}"
ProjectSection(ProjectDependencies) = postProject
{6E8E1663-B88D-4454-ADF2-279666A93306} = {6E8E1663-B88D-4454-ADF2-279666A93306}
{E070AAFC-9D03-41A3-BC7D-30887EA0D50F} = {E070AAFC-9D03-41A3-BC7D-30887EA0D50F}
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfiguration) = preSolution
Debug = Debug
@ -737,6 +744,10 @@ Global
{50651D04-C8F7-4C2B-B412-0848573BDF88}.Debug.Build.0 = Debug|Win32
{50651D04-C8F7-4C2B-B412-0848573BDF88}.Release.ActiveCfg = Release|Win32
{50651D04-C8F7-4C2B-B412-0848573BDF88}.Release.Build.0 = Release|Win32
{301A1EE3-8AF8-4EB8-9004-473B74E4083C}.Debug.ActiveCfg = Debug|Win32
{301A1EE3-8AF8-4EB8-9004-473B74E4083C}.Debug.Build.0 = Debug|Win32
{301A1EE3-8AF8-4EB8-9004-473B74E4083C}.Release.ActiveCfg = Release|Win32
{301A1EE3-8AF8-4EB8-9004-473B74E4083C}.Release.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EndGlobalSection