Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "Система";
Текущий архив: 2004.05.30;
Скачать: [xml.tar.bz2];

Вниз

Функция PlaySound   Найти похожие ветки 

 
Mosquito   (2004-04-22 01:22) [0]

Что нужно чтобы работала функция
PlaySound("c:\....\*.wav",0,SND_FILENAME) ? В хелпе только такой пример...


 
Yanis ©   (2004-04-22 07:51) [1]

Нужны мозги :)
И еще модуль MMSystem в Uses и файл c:\Music.wav


 
maxx0   (2004-04-23 13:08) [2]


const
 SND_SYNC=$0000;  // play synchronously (default)
 SND_ASYNC=$0001;  // play asynchronously
 SND_NODEFAULT=$0002;  // silence (!default) if sound not found    SND_MEMORY=$0004;  // pszSound points to a memory file */
 SND_LOOP=$0008;  // loop the sound until next sndPlaySound */
 SND_NOSTOP=$0010;  // don"t stop any currently playing sound */
 SND_NOWAIT=$00002000; // don"t wait if the driver is busy */
 SND_ALIAS=$00010000; // name is a registry alias */
 SND_ALIAS_ID=$00110000; // alias is a predefined ID */
 SND_FILENAME=$00020000; // name is file name */
 SND_RESOURCE=$00040004; // name is resource name or atom */
 SND_PURGE=$0040;  // purge non-static events for task */
 SND_APPLICATION=$0080;  // look for application specific association */

type
 TPlaySound=function(lpszSound:PChar;hmod:THandle;fdwSound:Cardinal):Boolean;stdcall;

var
 hWinMM:THandle;
 FPlaySound:TPlaySound=nil;

....

function sndPlaySound(lpszSound:PChar):Boolean;
begin
 Result:=False;
 if @FPlaySound<>nil then
   Result:=FPlaySound(lpszSound,0,SND_ASYNC or SND_FILENAME);
end;

initialization

 hWinMM:=LoadLibrary("winmm.dll");
 if hWinMM>0 then begin
   FPlaySound:=GetProcAddress(hWinMM,"PlaySoundA");
 end;

end.


 
maxx0   (2004-04-23 13:10) [3]

Читайте MSDN


 
Mosquito   (2004-04-23 15:14) [4]

maxx0: спасибо, но модуля MMSystem мне вполне хватило.

Тема закрыта.



Страницы: 1 вся ветка

Форум: "Система";
Текущий архив: 2004.05.30;
Скачать: [xml.tar.bz2];

Наверх





Память: 0.45 MB
Время: 0.033 c
4-1081943026
Сережа550
2004-04-14 15:43
2004.05.30
Сложная имитация клика левой кнопкой мышки в нужном окне


11-1074354973
XSDNYD
2004-01-17 18:56
2004.05.30
http://reactor.reality-protocol.de


14-1084470864
morg
2004-05-13 21:54
2004.05.30
Визуальный стиль ХР


3-1083805692
Slavik_v
2004-05-06 05:08
2004.05.30
Как организовать сортировку по двум полям?


14-1084502074
Helpme
2004-05-14 06:34
2004.05.30
Извините





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский