{"id":831,"date":"2008-05-30T14:14:23","date_gmt":"2008-05-30T14:14:23","guid":{"rendered":"http:\/\/6teen.ru\/?p=459"},"modified":"2008-05-30T14:14:23","modified_gmt":"2008-05-30T14:14:23","slug":"1154","status":"publish","type":"post","link":"http:\/\/pblog.ru\/lab\/?p=831","title":{"rendered":"\u041a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0440\u0435\u0433\u0443\u043b\u044f\u0442\u043e\u0440 \u0433\u0440\u043e\u043c\u043a\u043e\u0441\u0442\u0438"},"content":{"rendered":"<p>\u041a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0440\u0435\u0433\u0443\u043b\u044f\u0442\u043e\u0440 \u0433\u0440\u043e\u043c\u043a\u043e\u0441\u0442\u0438<br \/>\n<!--more--><\/p>\n<pre class=\"alt2\" style=\"margin:0px; padding:6px; border:1px inset; width:580px; height:320px; overflow:auto\"><div>\u041a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0440\u0435\u0433\u0443\u043b\u044f\u0442\u043e\u0440 \u0433\u0440\u043e\u043c\u043a\u043e\u0441\u0442\u0438\n\n\u0412\u041e\u0422 \u043d\u0430\u0448\u0435\u043b \u0432 \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435:\n\n\u042d\u0442\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u0433\u0440\u043e\u043c\u043a\u043e\u0441\u0442\u044c \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u0430\u043d\u0430\u043b\u0430 \u043d\u0430 1000.\n\nuses MMSystem;\n\nprocedure TForm1.Button1Click(Sender: TObject);\nvar\n  vol: longint;\n  LVol, RVol: integer;\nbegin\n  AuxGetVolume(ListBox1.ItemIndex, @Vol);\n  LVol := Vol shr 16;\n  if LVol < MaxWord - 1000\n    then LVol := LVol + 1000\n    else LVol := MaxWord;\n  RVol := (Vol shl 16) shr 16;\n  if RVol < MaxWord - 1000\n    then RVol := RVol + 1000\n    else RVol := MaxWord;\n  AuxSetVolume(ListBox1.ItemIndex, LVol shl 16 + RVol);\nend;\n\nprocedure TForm1.FormCreate(Sender: TObject);\nvar\n  i: integer;\n  cap: TAuxCaps;\nbegin\n  for i := 0 to auxGetNumDevs - 1 do begin\n    auxGetDevCaps(i, Addr(cap), SizeOf(cap));\n    ListBox1.Items.Add(cap.szPname)\n  end;\nend;\n\n\u0412\u0442\u043e\u0440\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442:\n\nuses mmsystem;\n\nfunction GetWaveVolume: DWord;\nvar Woc : TWAVEOUTCAPS;\n      Volume : DWord;\nbegin\nresult:=0;\nif WaveOutGetDevCaps(WAVE_MAPPER, @Woc, sizeof(Woc)) = MMSYSERR_NOERROR then\nif Woc.dwSupport and WAVECAPS_VOLUME = WAVECAPS_VOLUME then\nbegin\nWaveOutGetVolume(WAVE_MAPPER, @Volume);\nResult := Volume;\nend;\nend;\n\nprocedure SetWaveVolume(const AVolume: DWord);\nvar Woc : TWAVEOUTCAPS;\nbegin\nif WaveOutGetDevCaps(WAVE_MAPPER, @Woc, sizeof(Woc)) = MMSYSERR_NOERROR then\nif Woc.dwSupport and WAVECAPS_VOLUME = WAVECAPS_VOLUME then WaveOutSetVolume(WAVE_MAPPER, AVolume);\nend;\n\nprocedure TForm1.Button1Click(Sender: TObject);\nbegin\nBeep;\nend;\n\nprocedure TForm1.Button2Click(Sender: TObject);\nvar\tLeftVolume: Word;\n\tRightVolume: Word;\nbegin\nLeftVolume := StrToInt(Edit1.Text);\nRightVolume := StrToInt(Edit2.Text);\nSetWaveVolume(MakeLong(LeftVolume, RightVolume));\nend;\n\nprocedure TForm1.Button3Click(Sender: TObject);\nbegin\nCaption := IntToStr(GetWaveVolume);\nend;\n<\/div><\/pre>\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u041a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0440\u0435\u0433\u0443\u043b\u044f\u0442\u043e\u0440 \u0433\u0440\u043e\u043c\u043a\u043e\u0441\u0442\u0438<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[433,441],"tags":[210,1682],"_links":{"self":[{"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=\/wp\/v2\/posts\/831"}],"collection":[{"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=831"}],"version-history":[{"count":0,"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=\/wp\/v2\/posts\/831\/revisions"}],"wp:attachment":[{"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=831"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=831"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=831"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}