play once then crash

15 posts / 0 new
Last post
mritter0
mritter0's picture
Offline
Last seen: 5 months 1 week ago
Joined: 2014-04-21 21:15
play once then crash
I am using datatypes to play some sounds, mainly MP3s. It will work once, then the next sound locks up the computer.
  1. VOID
  2. PreviewSoundPlay()
  3. {
  4. if (!SoundPlaying)
  5. {
  6. PreviewSoundSignal=IExec->AllocSignal(-1);
  7.  
  8. if ((SoundObject=IDataTypes->NewDTObject(SoundPath,
  9. DTA_GroupID, GID_SOUND,
  10. SDTA_Volume, 64,
  11. SDTA_Cycles, 1,
  12. SDTA_Continuous, FALSE,
  13. SDTA_FreeSampleData, FALSE,
  14. SDTA_SignalTask, IExec->FindTask(NULL),
  15. SDTA_SignalBitMask, 1<<PreviewSoundSignal,
  16. TAG_END)))
  17. {
  18. ILayout->SetPageGadgetAttrs((struct Gadget *)Objects[GAD_PREVIEW_SOUND_PLAY],Objects[PAGE_PREVIEW_SOUND],MainWindow,NULL,
  19. GA_Selected, TRUE,
  20. TAG_DONE);
  21.  
  22. IDataTypes->DoDTMethod(SoundObject,NULL,NULL,DTM_TRIGGER,NULL,STM_PLAY,NULL);
  23. SoundPlaying=TRUE;
  24. }
  25. }
  26. else
  27. {
  28. PreviewSoundFree();
  29. }
  30.  
  31. }
  32.  
  33.  
  34. VOID
  35. PreviewSoundFree()
  36. {
  37. if (SoundObject)
  38. {
  39. IDataTypes->DoDTMethod(SoundObject,NULL,NULL,DTM_TRIGGER,NULL,STM_STOP,NULL);
  40. IDataTypes->DisposeDTObject(SoundObject);
  41. SoundObject=NULL;
  42. }
  43.  
  44. if (PreviewSoundSignal)
  45. IExec->FreeSignal(PreviewSoundSignal);
  46.  
  47. ILayout->SetPageGadgetAttrs((struct Gadget *)Objects[GAD_PREVIEW_SOUND_PLAY],Objects[PAGE_PREVIEW_SOUND],MainWindow,NULL,
  48. GA_Selected, FALSE,
  49. TAG_DONE);
  50.  
  51. SoundPlaying=FALSE;
  52. }
Using STM_STOP does not stop the sound from playing. Using MultiView I may get 3 MP3s to play before lock up. mpega.library (libmad version) 2.4 mpega.datatype 20.4 (08/06/2005)
jabirulo
jabirulo's picture
Offline
Last seen: 2 months 3 weeks ago
Joined: 2013-05-30 00:53
Re: play once then crash
Hi, I just found this pice of code that plays using datatypes a WAV file, maybe it helps you somehow:
  1. ;/*
  2. gcc -D__USE_INLINE__ -Wall dtplay.c -o dtPlay -lauto
  3. quit
  4. */
  5. #include <proto/exec.h>
  6. #include <proto/dos.h>
  7. #include <proto/intuition.h>
  8. #include <proto/datatypes.h>
  9. #include <clib/alib_protos.h>
  10. #include <datatypes/soundclass.h>
  11.  
  12.  
  13. int main(int argc, char **argv)
  14. {
  15. char *name = "albatros.wav";
  16. Object *o;
  17. BYTE sig;
  18.  
  19. if(argc > 1)
  20. name = argv[1];
  21.  
  22. if( (o=NewDTObject(name, DTA_GroupID,GID_SOUND, TAG_END)) )
  23. {
  24. sig = AllocSignal(-1);
  25. if(sig != -1)
  26. {
  27. SetAttrs(o, SDTA_SignalTask,FindTask(NULL), SDTA_SignalBit,1L << sig, TAG_END);
  28.  
  29. DoMethod(o,DTM_TRIGGER,NULL,STM_PLAY,NULL);
  30.  
  31. Wait( (1L << sig) | SIGBREAKF_CTRL_C );
  32.  
  33. FreeSignal(sig);
  34. }
  35.  
  36. DisposeDTObject(o);
  37. }
  38.  
  39. PrintFault(IoErr(), name);
  40.  
  41. return 0;
  42. }
EDIT1: tested with MP3 file (same mpega lib&dt as yours) and no problems.
AOS4.1/SAM460ex/PPC460EX-1155MHZ/2048MB/RadeonHD6570/SSD120GB/DVDRW :-P
mritter0
mritter0's picture
Offline
Last seen: 5 months 1 week ago
Joined: 2014-04-21 21:15
Re: play once then crash
Thanks for the code. I made some changes to mine based off it. I still can't play anything (WAV, MP3) more than once. I am using WinUAE. Could it be the lack of AHI hardware causing the problem?
Massi
Massi's picture
Offline
Last seen: 3 years 6 months ago
Joined: 2012-03-28 17:16
Re: play once then crash
I am using WinUAE. Could it be the lack of AHI hardware causing the problem?
Possible. WinUAE should output sound thanks to Toccata emulation, but you need Toccata AHI audio driver installed and configured within OS4. Not sure why you get the sound played once.
hypex
hypex's picture
Offline
Last seen: 6 months 1 week ago
Joined: 2011-09-09 16:20
Re: play once then crash
On my mobile so I can't say much. But I don't see you checking if you got a signal bit or the data type object. No matter. Does your code wait for a signal on stop now? In any case can you send us a crash log? Just stack trace, registers and assembly part should be fine.
mritter0
mritter0's picture
Offline
Last seen: 5 months 1 week ago
Joined: 2014-04-21 21:15
Re: play once then crash
I don't always get a chance to catch the lockups. I did get this crash log: Crash log for task "ahi.device Unit Process" Generated by GrimReaper 53.19 Crash occured in module at address 0x9CDC0400 Type of crash: ISI (Instruction Storage Interrupt) exception Alert number: 0x80000003 Register dump: GPR (General Purpose Registers): 0: 08864784 39EF7BA0 DEADBEEF 3FFB4420 3A7D1C70 3B0150AC 091C1F02 091BF15C 8: 3E900EBC 00000100 00000001 08864464 9CDC0401 DEADBEEF 3A2A0DE4 3A9A0E00 16: 09260000 C7C720C0 09260000 00000000 3A2A0DE0 00000000 08846B18 00000000 24: 3EA73D54 00000000 00000001 3E940000 00000000 3E911900 3A7D1C70 39EF7BF0 FPR (Floating Point Registers, NaN = Not a Number): 0: 2.11104e-314 -1.1886e+148 -1.1886e+148 -1.1886e+148 4: -1.1886e+148 -1.1886e+148 -1.1886e+148 -1.1886e+148 8: -1.1886e+148 -1.1886e+148 -1.1886e+148 -1.1886e+148 12: -1.1886e+148 -1.1886e+148 -1.1886e+148 -1.1886e+148 16: -1.1886e+148 -1.1886e+148 -1.1886e+148 -1.1886e+148 20: -1.1886e+148 -1.1886e+148 -1.1886e+148 -1.1886e+148 24: -1.1886e+148 -1.1886e+148 -1.1886e+148 -1.1886e+148 28: -1.1886e+148 -1.1886e+148 -1.1886e+148 -1.1886e+148 FPSCR (Floating Point Status and Control Register): 0xFEADBEEF SPRs (Special Purpose Registers): Machine State (msr) : 0x10003032 Condition (cr) : 0x39DBDD80 Instruction Pointer (ip) : 0x9CDC0400 Xtended Exception (xer) : 0x08824B24 Count (ctr) : 0x39DBE0F8 Link (lr) : 0x0002000E DSI Status (dsisr) : 0x39D4B0F4 Data Address (dar) : 0x39DBE0F8 680x0 emulated registers: DATA: 3B0150AC 00010003 00000248 00000000 00000000 00000000 00000000 00000001 ADDR: 3FFB4420 3B0150AC 3A7D1C70 3B015044 00DFF000 3EF87EF2 091C1F02 39EF7BBC FPU0: 0 0 0 0 FPU4: 0 0 0 0 Symbol info: Instruction pointer 0x9CDC0400 belongs to module "" (HUNK/Kickstart) Stack trace: 0x9CDC0400 symbol not available module DEVS:ahi.device at 0x1FB35A00 (section 5 @ 0x9DC) PPC disassembly: 9cdc03f8: XXXXXXXX illegal address 9cdc03fc: XXXXXXXX illegal address 9cdc0400: XXXXXXXX illegal address 9cdc0404: XXXXXXXX illegal address 9cdc0408: XXXXXXXX illegal address System information: CPU Model: 604e V9.516 CPU speed: 264 MHz FSB speed: 66 MHz Extensions: performancemonitor Machine Machine name: CyberStormPPC/A4000 Memory: 125940 KB Extensions: bus.zorro bus.pci classic.aga classic.ecs classic.ocs classic.customchips Expansion buses PCI/AGP Zorro Manufacturer 0x0202 Product 0x70 Zorro II Board @ 0x00e90000 Size 64 KB Manufacturer 0x07DB Product 0x53 Board has memory Zorro III Board @ 0x40000000 Size 128 MB Subsize same Manufacturer 0x0877 Product 0x18 Board has ROM Zorro III Board @ 0x48000000 Size 32 MB Subsize same Libraries 0x3ebdb38c: environment V2.0 (Legacy) 0x091c1f02: exec.library V53.70 0x3ff3401e: CirrusGD5446.chip V6.572 (Legacy) 0x3ff31504: PicassoIV.card V6.1118 (Legacy) 0x3ff8d228: cgxvideo.library V42.1 0x3b016948: mpega.datatype V20.4 0x3b016d10: sound.datatype V53.6 0x3beb80e0: jpeg.datatype V53.7 0x3b6db060: texteditor.gadget V53.21 0x3dc1f450: expat.library V53.4 0x3beb8c18: info.datatype V52.2 0x3beb8ae0: gif.datatype V53.4 0x3d688d48: speedbar.gadget V53.12 0x3d4f1858: radiobutton.gadget V53.9 0x3d4f1ac0: fuelgauge.gadget V53.8 0x3d4f1c10: datebrowser.gadget V53.7 0x3cc0643c: xadmaster.library V13.1 0x3d2ee3c4: mpega.library V2.4 0x3d2ff710: getscreenmode.gadget V53.8 0x3e024d10: arexx.class V53.5 0x3e024a90: slider.gadget V53.14 0x3e024810: getfont.gadget V53.9 0x3e024950: getfile.gadget V53.12 0x3e0246e8: clicktab.gadget V53.44 0x3e024450: checkbox.gadget V53.9 0x3e2a7db8: screenblanker.library V53.6 0x3e022794: asl.library V53.49 0x3e2ca060: requester.class V53.18 0x3e2aa580: space.gadget V53.6 0x3e390218: chooser.gadget V53.21 0x3e2aa440: penmap.image V53.5 0x3e2aa300: bitmap.image V53.9 0x3e2aa1c0: integer.gadget V53.12 0x3ea10888: listbrowser.gadget V53.62 0x3f1f7c20: string.gadget V53.20 0x3e3c51b0: scroller.gadget V53.14 0x3f3250b4: device.audio V6.2 0x3f32b618: filesave.audio V6.5 0x3ef87ef2: paula.audio V4.33 (Legacy) 0x3ea4b714: usergroup.library V4.30 0x3eb244d0: bsdsocket.library V4.307 0x3eec62d4: arp.library V40.2 (Legacy) 0x3f1a5660: mathieeedoubbas.library V52.1 0x3f2a43fc: textclip.library V53.1 0x3f2635e0: button.gadget V53.18 0x3f263680: glyph.image V53.3 0x3f1a4240: window.class V54.1 0x3f27d7d8: popupmenu.class V53.2 0x3f2fdcc8: popupmenu.library V53.11 0x3f263540: label.image V53.13 0x3f48a238: layout.gadget V54.2 0x3f27d6e0: bevel.image V53.6 0x3f2634a0: drawlist.image V53.3 0x3f263400: png.datatype V53.10 0x3f0e7874: picture.datatype V53.6 0x3f2efb6c: ft2.library V53.2 0x3ff0908c: workbench.library V53.53 0x3f2eb8a0: Picasso96API.library V54.9 0x3f2a35a0: gadtools.library V53.7 0x3f3759d8: timezone.library V53.8 0x3f27d038: application.library V53.12 0x3ffa899c: commodities.library V53.7 0x3f363540: datatypes.library V53.4 0x3f4740cc: icon.library V53.16 0x3f48a910: z.library V53.5 0x3f6bfc38: version.library V53.14 0x3f30f750: iffparse.library V53.1 0x3ffb5ccc: locale.library V53.7 0x3ff877ac: diskfont.library V53.5 0x3ff93858: petunia.library V53.6 0x3ff936d8: diskcache.library V3.30 0x3ffb9220: dos.library V53.157 0x3ff8dcb4: usbprivate.library V53.12 0x3fca903c: massstorage.usbfd V53.39 0x3ff000a8: bootmouse.usbfd V53.2 0x3ff00028: bootkeyboard.usbfd V52.3 0x3ff8db6c: hub.usbfd V53.10 0x3ff95e98: mounter.library V53.2 0x3ff8d6fc: usbresource.library V53.12 0x3ff8e3d8: hunk.library V53.4 0x3ff93594: elf.library V53.19 0x3ff5b4d0: intuition.library V54.10 0x3ff8c2c0: keymap.library V53.9 0x3ffab9e0: cybergraphics.library V43.0 0x3ffb4420: graphics.library V54.148 0x3ff91320: layers.library V54.12 0x3ff45150: rtg.library V54.89 0x3ffaa2b8: newlib.library V53.30 0x3ff9523c: p4ddc.library V1.5 (Legacy) 0x3ff93132: p4nonvolatile.library V3.4 (Legacy) 0x3fffe3ac: utility.library V54.1 0x3ffa8398: expansion.library V53.1 0x3f27858e: rexxsyslib.library V53.4 (Legacy) Devices 0x3df2fb14: ppp-ethernet.device V52.2 0x3f278784: audio.device V53.2 0x3ea73d54: ahi.device V6.6 0x3ec56eb4: ethernet.device V4.372 (Legacy) 0x3fffed10: usbsys.device V53.12 0x3fefd9b8: highway.usbhcd V1.7 0x3fffea48: console.device V53.83 0x3ff934a4: scsi.device V52.5 (Legacy) 0x3ff8d2f4: trackdisk.device V52.3 (Legacy) 0x3ff923f0: ramdrive.device V52.6 0x3ff8c50c: input.device V53.5 0x3ff873b4: keyboard.device V53.11 0x3fefd4f4: cybppc.device V53.2 0x3ff913c4: gameport.device V52.1 0x3ff92190: timer.device V53.2 Tasks ahi.device Unit Process (Crashed) Stack: 0x39ee8004 - 0x39ef7ffc, pointer @ 0x39ef7ba0 (Cookie OK) Signals: SigRec 0xf000c000, SigWait 0xc8000000 State: Process (Crashed) ClickToFront (Waiting) Stack: 0x3e1f2004 - 0x3e201ffc, pointer @ 0x3e2019f0 (Cookie OK) Signals: SigRec 0xe000d000, SigWait 0x00000100 State: Process (Waiting) input.device (Waiting) Stack: 0x3fcea000 - 0x3fcfa000, pointer @ 0x3fcf9f00 (Cookie OK) Signals: SigRec 0x80000000, SigWait 0x00000000 State: Task (Waiting) SFS DosList handler (Waiting) Stack: 0x3f8fa004 - 0x3f8fdffc, pointer @ 0x3f8fdf20 (Cookie OK) Signals: SigRec 0x80000000, SigWait 0x00000000 State: Process (Waiting) USB stack (Waiting) Stack: 0x3fef1000 - 0x3fef5000, pointer @ 0x3fef4f20 (Cookie OK) Signals: SigRec 0xf8007000, SigWait 0x00000000 State: Task (Waiting) ethernet.device (Waiting) Stack: 0x3e970040 - 0x3e972040, pointer @ 0x3e971fa0 (Cookie OK) Signals: SigRec 0xf0000000, SigWait 0x00000000 State: Task (Waiting) cybppc.device (Waiting) Stack: 0x3fcfa000 - 0x3fd0a000, pointer @ 0x3fd09f00 (Cookie OK) Signals: SigRec 0xe0000000, SigWait 0x00000000 State: Task (Waiting) page_sweep (Waiting) Stack: 0x3fcb8004 - 0x3fcbfffc, pointer @ 0x3fcbfe70 (Cookie OK) Signals: SigRec 0x80000000, SigWait 0x00000000 State: Task (Waiting) scsi.device (Waiting) Stack: 0x3ff5e000 - 0x3ff60000, pointer @ 0x3ff5ff90 (Cookie OK) Signals: SigRec 0xe0000000, SigWait 0x00000000 State: Task (Waiting) DF0/FastFileSystem 53.2 (Waiting) Stack: 0x3f7d1004 - 0x3f7d4ffc, pointer @ 0x3f7d4ed0 (Cookie OK) Signals: SigRec 0xa8000100, SigWait 0x00000000 State: Process (Waiting) DH3/FastFileSystem 53.2 (Waiting) Stack: 0x3f6a9004 - 0x3f6acffc, pointer @ 0x3f6aced0 (Cookie OK) Signals: SigRec 0xa8000100, SigWait 0x00000000 State: Process (Waiting) DF3/FastFileSystem 53.2 (Waiting) Stack: 0x3f541004 - 0x3f544ffc, pointer @ 0x3f544ed0 (Cookie OK) Signals: SigRec 0xa8000100, SigWait 0x00000000 State: Process (Waiting) DF1/FastFileSystem 53.2 (Waiting) Stack: 0x3f579004 - 0x3f57cffc, pointer @ 0x3f57ced0 (Cookie OK) Signals: SigRec 0xa8000100, SigWait 0x00000000 State: Process (Waiting) DF2/FastFileSystem 53.2 (Waiting) Stack: 0x3f559004 - 0x3f55cffc, pointer @ 0x3f55ced0 (Cookie OK) Signals: SigRec 0xa8000100, SigWait 0x00000000 State: Process (Waiting) DH0/SmartFilesystem 1.290 (Waiting) Stack: 0x3fc18004 - 0x3fc1bffc, pointer @ 0x3fc1beb0 (Cookie OK) Signals: SigRec 0xe0000100, SigWait 0x00000000 State: Process (Waiting) CD0/CDFileSystem 53.4 (Waiting) Stack: 0x3f8f2004 - 0x3f8f5ffc, pointer @ 0x3f8f5f30 (Cookie OK) Signals: SigRec 0x00000100, SigWait 0x00000000 State: Process (Waiting) reaper.task (Waiting) Stack: 0x3f491004 - 0x3f498ffc, pointer @ 0x3f498660 (Cookie OK) Signals: SigRec 0x00007000, SigWait 0x00000000 State: Process (Waiting) DH2/SmartFilesystem 1.290 (Waiting) Stack: 0x3f731004 - 0x3f734ffc, pointer @ 0x3f734eb0 (Cookie OK) Signals: SigRec 0xe0000100, SigWait 0x00000000 State: Process (Waiting) KeyMacro-Handler (Waiting) Stack: 0x3eb50004 - 0x3eb60004, pointer @ 0x3eb5ff40 (Cookie OK) Signals: SigRec 0x10001000, SigWait 0x00000000 State: Process (Waiting) RAM/ram-handler 53.171 (Waiting) Stack: 0x3f42c004 - 0x3f42fffc, pointer @ 0x3f42fc80 (Cookie OK) Signals: SigRec 0x80000000, SigWait 0x00000100 State: Process (Waiting) DH1/SmartFilesystem 1.290 (Waiting) Stack: 0x3f7b9004 - 0x3f7bcffc, pointer @ 0x3f7bceb0 (Cookie OK) Signals: SigRec 0xe0000100, SigWait 0x00000000 State: Process (Waiting) pager (Waiting) Stack: 0x3f451004 - 0x3f470ffc, pointer @ 0x3f470f00 (Cookie OK) Signals: SigRec 0x80001000, SigWait 0x00000000 State: Process (Waiting) dos_filedir_notify (Waiting) Stack: 0x3fc50004 - 0x3fc53ffc, pointer @ 0x3fc53ad0 (Cookie OK) Signals: SigRec 0x40001000, SigWait 0x80000000 State: Process (Waiting) WinFrame 1 Process (Waiting) Stack: 0x3db8b004 - 0x3dbcaffc, pointer @ 0x3dbcaec0 (Cookie OK) Signals: SigRec 0xff800000, SigWait 0x00000000 State: Process (Waiting) WinFrame 2 Process (Waiting) Stack: 0x39e76004 - 0x39eb5ffc, pointer @ 0x39eb5ec0 (Cookie OK) Signals: SigRec 0xff800000, SigWait 0x00000000 State: Process (Waiting) trackdisk.device (Waiting) Stack: 0x3f571000 - 0x3f573000, pointer @ 0x3f572f90 (Cookie OK) Signals: SigRec 0x00000300, SigWait 0x00000000 State: Task (Waiting) trackdisk.device (Waiting) Stack: 0x3f525000 - 0x3f527000, pointer @ 0x3f526f90 (Cookie OK) Signals: SigRec 0x00000300, SigWait 0x00000000 State: Task (Waiting) trackdisk.device (Waiting) Stack: 0x3f56d000 - 0x3f56f000, pointer @ 0x3f56ef90 (Cookie OK) Signals: SigRec 0x00000300, SigWait 0x00000000 State: Task (Waiting) trackdisk.device (Waiting) Stack: 0x3fccd000 - 0x3fccf000, pointer @ 0x3fccef90 (Cookie OK) Signals: SigRec 0x00000300, SigWait 0x00000000 State: Task (Waiting) CON/con-handler 53.72 (Waiting) Stack: 0x3ec73004 - 0x3ec82ffc, pointer @ 0x3ec82e20 (Cookie OK) Signals: SigRec 0xb0000100, SigWait 0x00000000 State: Process (Waiting) ENV/env-handler 54.5 (Waiting) Stack: 0x3f434004 - 0x3f437ffc, pointer @ 0x3f437ef0 (Cookie OK) Signals: SigRec 0x80000000, SigWait 0x00000100 State: Process (Waiting) PAR/Port-Handler 52.2 (Waiting) Stack: 0x3b576004 - 0x3b585ffc, pointer @ 0x3b585ee0 (Cookie OK) Signals: SigRec 0xc0000000, SigWait 0x00000100 State: Process (Waiting) PRT/Port-Handler 52.2 (Waiting) Stack: 0x3b5ac004 - 0x3b5bbffc, pointer @ 0x3b5bbee0 (Cookie OK) Signals: SigRec 0xc0000000, SigWait 0x00000100 State: Process (Waiting) RANDOM/Random-Handler 52.1 (Waiting) Stack: 0x3ede6004 - 0x3edf5ffc, pointer @ 0x3edf5ef0 (Cookie OK) Signals: SigRec 0x00000100, SigWait 0x00000000 State: Process (Waiting) SER/Port-Handler 52.2 (Waiting) Stack: 0x3b5cd004 - 0x3b5dcffc, pointer @ 0x3b5dcee0 (Cookie OK) Signals: SigRec 0xc0000000, SigWait 0x00000100 State: Process (Waiting) URL/launch-handler 53.38 (Waiting) Stack: 0x3ee1e004 - 0x3ee98ffc, pointer @ 0x3ee94fb0 (Cookie OK) Signals: SigRec 0x80000000, SigWait 0x00000100 State: Process (Waiting) AUX/aux-handler 53.4 (Waiting) Stack: 0x3ab4e004 - 0x3ab5dffc, pointer @ 0x3ab5def0 (Cookie OK) Signals: SigRec 0xa0000100, SigWait 0x00000000 State: Process (Waiting) CON/con-handler 53.72 (Waiting) Stack: 0x3dbe1004 - 0x3dbf0ffc, pointer @ 0x3dbf0e20 (Cookie OK) Signals: SigRec 0xb0000100, SigWait 0x00000000 State: Process (Waiting) AUX/aux-handler 53.4 (Waiting) Stack: 0x39afa004 - 0x39b09ffc, pointer @ 0x39b09ef0 (Cookie OK) Signals: SigRec 0xa0000100, SigWait 0x00000000 State: Process (Waiting) AUX/aux-handler 53.4 (Waiting) Stack: 0x39b7a004 - 0x39b89ffc, pointer @ 0x39b89ef0 (Cookie OK) Signals: SigRec 0xa0000100, SigWait 0x00000000 State: Process (Waiting) AUX/aux-handler 53.4 (Waiting) Stack: 0x3a260004 - 0x3a26fffc, pointer @ 0x3a26fef0 (Cookie OK) Signals: SigRec 0xa0000100, SigWait 0x00000000 State: Process (Waiting) AUX/aux-handler 53.4 (Waiting) Stack: 0x3ba0a004 - 0x3ba19ffc, pointer @ 0x3ba19ef0 (Cookie OK) Signals: SigRec 0xa0000100, SigWait 0x00000000 State: Process (Waiting) AUX/aux-handler 53.4 (Waiting) Stack: 0x39970004 - 0x3997fffc, pointer @ 0x3997fef0 (Cookie OK) Signals: SigRec 0xa0000100, SigWait 0x00000000 State: Process (Waiting) AUX/aux-handler 53.4 (Waiting) Stack: 0x3a9b1004 - 0x3a9c0ffc, pointer @ 0x3a9c0ef0 (Cookie OK) Signals: SigRec 0xa0000100, SigWait 0x00000000 State: Process (Waiting) AUX/aux-handler 53.4 (Waiting) Stack: 0x3acab004 - 0x3acbaffc, pointer @ 0x3acbaef0 (Cookie OK) Signals: SigRec 0xa0000100, SigWait 0x00000000 State: Process (Waiting) AUX/aux-handler 53.4 (Waiting) Stack: 0x3b2d3004 - 0x3b2e2ffc, pointer @ 0x3b2e2ef0 (Cookie OK) Signals: SigRec 0xa0000100, SigWait 0x00000000 State: Process (Waiting) AUX/aux-handler 53.4 (Waiting) Stack: 0x3aa44004 - 0x3aa53ffc, pointer @ 0x3aa53ef0 (Cookie OK) Signals: SigRec 0xa0000100, SigWait 0x00000000 State: Process (Waiting) AUX/aux-handler 53.4 (Waiting) Stack: 0x3a3ac004 - 0x3a3bbffc, pointer @ 0x3a3bbef0 (Cookie OK) Signals: SigRec 0xa0000100, SigWait 0x00000000 State: Process (Waiting) AUX/aux-handler 53.4 (Waiting) Stack: 0x3afdb004 - 0x3afeaffc, pointer @ 0x3afeaef0 (Cookie OK) Signals: SigRec 0xa0000100, SigWait 0x00000000 State: Process (Waiting) AUX/aux-handler 53.4 (Waiting) Stack: 0x3a62a004 - 0x3a639ffc, pointer @ 0x3a639ef0 (Cookie OK) Signals: SigRec 0xa0000100, SigWait 0x00000000 State: Process (Waiting) AUX/aux-handler 53.4 (Waiting) Stack: 0x3b139004 - 0x3b148ffc, pointer @ 0x3b148ef0 (Cookie OK) Signals: SigRec 0xa0000100, SigWait 0x00000000 State: Process (Waiting) AUX/aux-handler 53.4 (Waiting) Stack: 0x3b555004 - 0x3b564ffc, pointer @ 0x3b564ef0 (Cookie OK) Signals: SigRec 0xa0000100, SigWait 0x00000000 State: Process (Waiting) CON/con-handler 53.72 (Waiting) Stack: 0x3e9c6004 - 0x3e9d5ffc, pointer @ 0x3e9d5e20 (Cookie OK) Signals: SigRec 0xa0000100, SigWait 0x00000000 State: Process (Waiting) CON/con-handler 53.72 (Waiting) Stack: 0x3e04a004 - 0x3e059ffc, pointer @ 0x3e059e20 (Cookie OK) Signals: SigRec 0xa0000100, SigWait 0x00000000 State: Process (Waiting) CON/con-handler 53.72 (Waiting) Stack: 0x3e0bf004 - 0x3e0ceffc, pointer @ 0x3e0cee20 (Cookie OK) Signals: SigRec 0xa0000100, SigWait 0x00000000 State: Process (Waiting) CON/con-handler 53.72 (Waiting) Stack: 0x3e105004 - 0x3e114ffc, pointer @ 0x3e114e20 (Cookie OK) Signals: SigRec 0xa0000100, SigWait 0x00000000 State: Process (Waiting) CON/con-handler 53.72 (Waiting) Stack: 0x3e12b004 - 0x3e13affc, pointer @ 0x3e13ae20 (Cookie OK) Signals: SigRec 0xa0000100, SigWait 0x00000000 State: Process (Waiting) CON/con-handler 53.72 (Waiting) Stack: 0x3e237004 - 0x3e246ffc, pointer @ 0x3e246e20 (Cookie OK) Signals: SigRec 0xa0000100, SigWait 0x00000000 State: Process (Waiting) CON/con-handler 53.72 (Waiting) Stack: 0x3f340004 - 0x3f34fffc, pointer @ 0x3f34fe20 (Cookie OK) Signals: SigRec 0xa0000100, SigWait 0x00000000 State: Process (Waiting) AUDIO/AHI-Handler 6.2 (Waiting) Stack: 0x3edc6004 - 0x3edd6004, pointer @ 0x3edd5ec0 (Cookie OK) Signals: SigRec 0x00000100, SigWait 0x00000000 State: Process (Waiting) APPDIR/appdir-handler-in-dos 53.157 (Waiting) Stack: 0x3f445004 - 0x3f44cffc, pointer @ 0x3f44cdd0 (Cookie OK) Signals: SigRec 0x80000000, SigWait 0x00000100 State: Process (Waiting) CON/con-handler 53.72 (Waiting) Stack: 0x3f4d5004 - 0x3f4dcffc, pointer @ 0x3f4dce20 (Cookie OK) Signals: SigRec 0xa0000100, SigWait 0x00000000 State: Process (Waiting) RAW/con-handler 53.72 (Waiting) Stack: 0x3f4f9004 - 0x3f500ffc, pointer @ 0x3f500e20 (Cookie OK) Signals: SigRec 0xa0000100, SigWait 0x00000000 State: Process (Waiting) CON/con-handler 53.72 (Waiting) Stack: 0x3f51d004 - 0x3f524ffc, pointer @ 0x3f524e20 (Cookie OK) Signals: SigRec 0xa0000100, SigWait 0x00000000 State: Process (Waiting) dos_nbmd_process (Waiting) Stack: 0x3fc60004 - 0x3fc63ffc, pointer @ 0x3fc63f30 (Cookie OK) Signals: SigRec 0x00001100, SigWait 0x00000000 State: Process (Waiting) dos_lock_handler (Waiting) Stack: 0x3fc68004 - 0x3fc6bffc, pointer @ 0x3fc6bf00 (Cookie OK) Signals: SigRec 0x00001100, SigWait 0x00000000 State: Process (Waiting) RexxMaster (Waiting) Stack: 0x3ed3a004 - 0x3ed4a004, pointer @ 0x3ed49f60 (Cookie OK) Signals: SigRec 0xc0000000, SigWait 0x00000000 State: Process (Waiting) TEXTCLIP/textclip-handler 53.1 (Waiting) Stack: 0x3ee02004 - 0x3ee11ffc, pointer @ 0x3ee11eb0 (Cookie OK) Signals: SigRec 0x80000000, SigWait 0x00000100 State: Process (Waiting) ScreenBlanker Library. (Waiting) Stack: 0x3df8e004 - 0x3df9effc, pointer @ 0x3df9ef00 (Cookie OK) Signals: SigRec 0xb4001000, SigWait 0x00000100 State: Process (Waiting) Workbench (Waiting) Stack: 0x3ea84004 - 0x3ea93ffc, pointer @ 0x3ea93ea0 (Cookie OK) Signals: SigRec 0x80000000, SigWait 0x00000000 State: Process (Waiting) mpegadt_playtask (Waiting) Stack: 0x39f05004 - 0x39f14ffc, pointer @ 0x39f14ef0 (Cookie OK) Signals: SigRec 0x80000000, SigWait 0x00000100 State: Process (Waiting) mpegadt_loadtask (Waiting) Stack: 0x39f22004 - 0x39f31ffc, pointer @ 0x39f31e90 (Cookie OK) Signals: SigRec 0x00000010, SigWait 0x00000100 State: Process (Waiting) ramlib (Waiting) Stack: 0x3f392004 - 0x3f3aaffc, pointer @ 0x3f3aaf20 (Cookie OK) Signals: SigRec 0x80001000, SigWait 0x00000100 State: Process (Waiting) Workbench DosList Notify (Waiting) Stack: 0x3e3cd004 - 0x3e3dcffc, pointer @ 0x3e3dcf40 (Cookie OK) Signals: SigRec 0x00003000, SigWait 0x00000100 State: Process (Waiting) texteditor.gadget Clipboard Server (Waiting) Stack: 0x3c2b7004 - 0x3c2d6ffc, pointer @ 0x3c2d6f00 (Cookie OK) Signals: SigRec 0x80000000, SigWait 0x00000100 State: Process (Waiting) ContextMenus Command Dispatcher (Waiting) Stack: 0x3dcbb004 - 0x3dccaffc, pointer @ 0x3dccaf30 (Cookie OK) Signals: SigRec 0x80001000, SigWait 0x00000000 State: Process (Waiting) string.gadget server (Waiting) Stack: 0x3e398004 - 0x3e3a7ffc, pointer @ 0x3e3a7db0 (Cookie OK) Signals: SigRec 0x40000000, SigWait 0x00000100 State: Process (Waiting) Workbench Clipboard Server (Waiting) Stack: 0x3e461004 - 0x3e470ffc, pointer @ 0x3e470f00 (Cookie OK) Signals: SigRec 0x80000000, SigWait 0x00000100 State: Process (Waiting) RinghioServer (Ready) Stack: 0x3e148004 - 0x3e167ffc, pointer @ 0x3e167370 (Cookie OK) Signals: SigRec 0xd8001000, SigWait 0x10000100 State: Process (Ready) TCP/IP Control (Waiting) Stack: 0x3e9ee004 - 0x3e9fdffc, pointer @ 0x3e9fddc0 (Cookie OK) Signals: SigRec 0xf8009080, SigWait 0x00000000 State: Process (Waiting) ppp-ethernet.device (Waiting) Stack: 0x3de03004 - 0x3de12ffc, pointer @ 0x3de12e90 (Cookie OK) Signals: SigRec 0xdc000000, SigWait 0x00000100 State: Process (Waiting) Background CLI [smbfs '//192.168.1.240/mark/mritter0'] (Waiting) Stack: 0x3dca3004 - 0x3dcb2ffc, pointer @ 0x3dcb29b0 (Cookie OK) Signals: SigRec 0x80009000, SigWait 0x00000100 State: Process (Waiting) MultiView (Waiting) Stack: 0x39fa6004 - 0x39fb5ffc, pointer @ 0x39fb5bb0 (Cookie OK) Signals: SigRec 0xf0001000, SigWait 0x00000100 State: Process (Waiting) TCP/IP Superserver (Waiting) Stack: 0x3ea1f004 - 0x3ea2effc, pointer @ 0x3ea2e9f0 (Cookie OK) Signals: SigRec 0xd0000080, SigWait 0x00000000 State: Process (Waiting) Background CLI [Programming:Sashimi/Sashimi] (Waiting) Stack: 0x3eca1004 - 0x3ecb0ffc, pointer @ 0x3ecb0a20 (Cookie OK) Signals: SigRec 0x6000f000, SigWait 0x00000100 State: Process (Waiting) Shell Process [WorkbenchExplorer] (Waiting) Stack: 0x3c549004 - 0x3c568ffc, pointer @ 0x3c568c30 (Cookie OK) Signals: SigRec 0x27e00000, SigWait 0x00000000 State: Process (Waiting) New Process (Waiting) Stack: 0x3c3e8004 - 0x3c407ffc, pointer @ 0x3c407f20 (Cookie OK) Signals: SigRec 0x80000000, SigWait 0x00000100 State: Process (Waiting) Mounter GUI (Waiting) Stack: 0x3ebbe004 - 0x3ebd1ffc, pointer @ 0x3ebd1e00 (Cookie OK) Signals: SigRec 0x80007000, SigWait 0x00000000 State: Process (Waiting) application.library messageserver (Waiting) Stack: 0x3f27e000 - 0x3f27efa0, pointer @ 0x3f27ef10 (Cookie OK) Signals: SigRec 0xc0000000, SigWait 0x00000000 State: Task (Waiting) AmiDock (Waiting) Stack: 0x3e16c004 - 0x3e17bffc, pointer @ 0x3e17b9b0 (Cookie OK) Signals: SigRec 0x7f40d000, SigWait 0x00000000 State: Process (Waiting) New Process (Waiting) Stack: 0x3c22d004 - 0x3c24cffc, pointer @ 0x3c24cf20 (Cookie OK) Signals: SigRec 0x80000000, SigWait 0x00000100 State: Process (Waiting) ScreenBlankerEngine (Waiting) Stack: 0x3e206004 - 0x3e215ffc, pointer @ 0x3e215be0 (Cookie OK) Signals: SigRec 0xd8001000, SigWait 0x00000100 State: Process (Waiting) TCP/IP Configuration (Waiting) Stack: 0x3ea98004 - 0x3eaa7ffc, pointer @ 0x3eaa7e10 (Cookie OK) Signals: SigRec 0xf8003000, SigWait 0x00000000 State: Process (Waiting) pftp (Waiting) Stack: 0x3e89b004 - 0x3e8daffc, pointer @ 0x3e8dac90 (Cookie OK) Signals: SigRec 0x7e801000, SigWait 0x00000100 State: Process (Waiting) PFTP local browser task (Waiting) Stack: 0x3db05004 - 0x3db44ffc, pointer @ 0x3db43ef0 (Cookie OK) Signals: SigRec 0x80001000, SigWait 0x00000000 State: Process (Waiting) PFTP FTP browser task (Waiting) Stack: 0x3cc0b004 - 0x3cc4affc, pointer @ 0x3cc4af20 (Cookie OK) Signals: SigRec 0xc0001000, SigWait 0x00000000 State: Process (Waiting) ContextMenus (Waiting) Stack: 0x3e180004 - 0x3e18fffc, pointer @ 0x3e18fc90 (Cookie OK) Signals: SigRec 0xe0001000, SigWait 0x00000100 State: Process (Waiting) datatypes.library (Waiting) Stack: 0x3f086004 - 0x3f095ffc, pointer @ 0x3f095f10 (Cookie OK) Signals: SigRec 0x00001100, SigWait 0x00000000 State: Process (Waiting) « IPrefs » (Waiting) Stack: 0x3f2b2004 - 0x3f2c1ffc, pointer @ 0x3f2c1980 (Cookie OK) Signals: SigRec 0x0000f000, SigWait 0x20000100 State: Process (Waiting) ASYNCWB (Waiting) Stack: 0x3e278004 - 0x3e287ffc, pointer @ 0x3e287e80 (Cookie OK) Signals: SigRec 0x80001000, SigWait 0x00000100 State: Process (Waiting) DefIcons (Waiting) Stack: 0x3e264004 - 0x3e273ffc, pointer @ 0x3e273dc0 (Cookie OK) Signals: SigRec 0x80009000, SigWait 0x00000100 State: Process (Waiting) RAWBInfo (Waiting) Stack: 0x3e21a004 - 0x3e229ffc, pointer @ 0x3e229ec0 (Cookie OK) Signals: SigRec 0x80001000, SigWait 0x00000100 State: Process (Waiting) TCP/IP Log (Waiting) Stack: 0x3eab5004 - 0x3eac4ffc, pointer @ 0x3eac4f00 (Cookie OK) Signals: SigRec 0x80003000, SigWait 0x00000000 State: Process (Waiting) Background CLI [C:nm2mw] (Waiting) Stack: 0x3ec21004 - 0x3ec31004, pointer @ 0x3ec30f60 (Cookie OK) Signals: SigRec 0x00001000, SigWait 0x00000100 State: Process (Waiting) Background CLI [Programming:MemGuard/MemGuard] (Waiting) Stack: 0x3ecea004 - 0x3ecf9ffc, pointer @ 0x3ecf9ea0 (Cookie OK) Signals: SigRec 0x0000f000, SigWait 0x00000100 State: Process (Waiting) ConClip (Waiting) Stack: 0x3ed8a004 - 0x3ed99ffc, pointer @ 0x3ed99eb0 (Cookie OK) Signals: SigRec 0x80000000, SigWait 0x00000000 State: Process (Waiting) USB stack Process (Waiting) Stack: 0x3eeb1004 - 0x3eec0ffc, pointer @ 0x3eec0ee0 (Cookie OK) Signals: SigRec 0x80001000, SigWait 0x00000010 State: Process (Waiting) MassStorage Notifier (Waiting) Stack: 0x3fc98000 - 0x3fc9fd00, pointer @ 0x3fc9fc70 (Cookie OK) Signals: SigRec 0x80001000, SigWait 0x00000000 State: Task (Waiting) DST watcher (Waiting) Stack: 0x3f237004 - 0x3f246ffc, pointer @ 0x3f246f10 (Cookie OK) Signals: SigRec 0xc0000000, SigWait 0x00000000 State: Process (Waiting) ramlib.support (Waiting) Stack: 0x3f3af004 - 0x3f3c7ffc, pointer @ 0x3f3c7f00 (Cookie OK) Signals: SigRec 0x80005000, SigWait 0x00000000 State: Process (Waiting) Mounter Task (Waiting) Stack: 0x3fca0000 - 0x3fca8000, pointer @ 0x3fca7e10 (Cookie OK) Signals: SigRec 0xb0001000, SigWait 0x00000000 State: Task (Waiting) Mounter Companion Process (Waiting) Stack: 0x3ebe3004 - 0x3ebf2ffc, pointer @ 0x3ebf2f40 (Cookie OK) Signals: SigRec 0x80003000, SigWait 0x00000000 State: Process (Waiting) Mounter Task (Waiting) Stack: 0x3fcac000 - 0x3fcb4000, pointer @ 0x3fcb3f10 (Cookie OK) Signals: SigRec 0xb0001000, SigWait 0x00000000 State: Task (Waiting) dos_signal_server (Waiting) Stack: 0x3fc58004 - 0x3fc5bffc, pointer @ 0x3fc5bf10 (Cookie OK) Signals: SigRec 0x0000f000, SigWait 0x00000000 State: Process (Waiting) Sound_ObjectHandler (Waiting) Stack: 0x39f8a004 - 0x39f99ffc, pointer @ 0x39f99e90 (Cookie OK) Signals: SigRec 0x4000f000, SigWait 0x00000100 State: Process (Waiting) dos_appdir_server (Waiting) Stack: 0x3fc44004 - 0x3fc4bffc, pointer @ 0x3fc4bd40 (Cookie OK) Signals: SigRec 0x80005000, SigWait 0x00000000 State: Process (Waiting) idle.task (Ready) Stack: 0x3ff8b000 - 0x3ff8c000, pointer @ 0x3ff8bfd0 (Cookie OK) Signals: SigRec 0x00000000, SigWait 0x00000000 State: Task (Ready)
mritter0
mritter0's picture
Offline
Last seen: 5 months 1 week ago
Joined: 2014-04-21 21:15
Re: play once then crash
I went to Prefs/AHI, Paula:HiFi 8 bit stereo++, is what is chosen. I clicked the "Play a test sound", played like 5 times, then locked up. Doesn't crash to get Grimm Reaper report. I tried a couple other choices. Some gave me more plays, some less, before locking up.
Massi
Massi's picture
Offline
Last seen: 3 years 6 months ago
Joined: 2012-03-28 17:16
Re: play once then crash
@mritter0 To me it seems like emulation quirks. Do you get sound through music applications for example or? Anyway, WinUAE should output 16 bit audio through Toccata sound card emulation, so basically: 1) make sure Toccata emulation is enabled within WinUAE 2) make sure you have Toccata AHI audio driver installed and configured within OS4 This link here may be of help: https://amigafun.wordpress.com/2015/01/03/winuae-with-toccata-emulation/ Let me know.
hypex
hypex's picture
Offline
Last seen: 6 months 1 week ago
Joined: 2011-09-09 16:20
Re: play once then crash
That's a big log! It should be possible to look up the AHI source to see where it crashed. It's quite bad, it lost the IP address! :o You might want to try SDTA_SignalBitNumber instead. SDTA_SignalBit had a bug where it used it as a mask instead. And they added a new tag instead of fixing it. Also, do you wait for your signal bit after stopping and before freeing now?
mritter0
mritter0's picture
Offline
Last seen: 5 months 1 week ago
Joined: 2014-04-21 21:15
Re: play once then crash
I will try the other signal tag. I put it on the back burner for the time being. For my testing I am not playing the entire song. Start it, select next, PreviewSoundFree(), start the new one, etc. After sending STM_STOP the docs say nothing about waiting for a response. It says just calling DisposeObject() is really all you need to do. I would prefer STM_STOP to actually stop playing. STM_PAUSE to work would be nice, too. AmigaAmp works fine.
thomas
thomas's picture
Offline
Last seen: 1 month 2 weeks ago
Joined: 2011-05-16 14:23
Re: play once then crash
You don't need to supply a signal if you don't want to wait for it. The signal is only there to wait for the end of the sound. If you don't need to know about the end of the sound, then just leave away all the signal handling. Issue the STM_PLAY method and forget about it. I tried mpega.datatype on OS 4.1 FE in WinUAE using the Paula Hifi 14 bit stereo++ calibrated AHI driver at 22050 Hz with 10 channels. I can play as many mp3s as I like. I did not manage to get it to a halt or crash. STM_STOP not working is a limitation of mpega.datatype. When I wrote it, the documentation said that STM_PLAY is the only trigger supported by sound.datatype and therefore I only implemented that. Normally a subclass should not implement trigger methods on its own, but because mpega.datatype needs to stream data and sound.datatype does not support streaming, I had to do so.
mritter0
mritter0's picture
Offline
Last seen: 5 months 1 week ago
Joined: 2014-04-21 21:15
Re: play once then crash
I now use a PCI Bridgeboard and SB128 emulation and it seems to be working much better. I haven't thrown a lot at it to test yet, but so far so good.
hypex
hypex's picture
Offline
Last seen: 6 months 1 week ago
Joined: 2011-09-09 16:20
Re: play once then crash
I can confirm there is something wrong. I had some AmigaE code to test playing a sample with datatypes and it does almost exactly the same thing your code does. It worked fine with AIFF. IIRC didn't try WAV. But I downloaded MPEGA DT from OS4Depot and tested an mp3. It crashed straight out! Looks like that was a stack issue. My code was 68K but crashed in the library trying to set a stack pointer by the looks of it. So "fixed" my code that used the broken signal tag. Ran again. Another crash. But in the kernel somewhere. Note that no crashes were in 68K. Next I tried to compile my program as PPC. Went fine. Ran and another crash! Looked similar to yours with the ISI error. Like you I also tested with MultiView and it played fine. Perhaps unlike you I could not get any sound from my program. Crashed instantly. Seems there is a condition causing MPEGA DT to crash under certain circumstances.. I tested on my A1 with OS4.1.U6 and a SB Live.
xenic
xenic's picture
Offline
Last seen: 5 months 4 days ago
Joined: 2011-05-07 04:52
Re: play once then crash
@thomas I tried mpegdt with several compiled test programs and MP3's played fine on my X1000 internal sound except for one case. I have a test program that loads the entire file into memory and plays it from memory using "DTA_SourceType, DTST_MEMORY". When I attempt to play an MP3 with that program I get a crash in datatypes.library. I can play other huge soundfiles like AIFF & WAV with my program so it appears that there is a problem with mpega.datatype. Could you check it out? If it can't play from memory then maybe it should just return a failure code and avoid a crash. NOTE: I'm compiling my programs in 'C' with the latest public OS4 SDK.
X1000 - OS 4.1FE
mritter0
mritter0's picture
Offline
Last seen: 5 months 1 week ago
Joined: 2014-04-21 21:15
Re: play once then crash
I just tried to play some WAV movie sound-byte samples, also locks up. No sound at all. Using salass00's datatype.
Log in or register to post comments