Results 1 to 2 of 2

Thread: UI module interference

  1. #1
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732

    UI module interference

    Hi,

    I have a problem.
    I need to use mciSendString in my next TBGL tutorial to play multiple sounds at once.

    All works perfect, until I bind the UI module.

    This code works:
      DECLARE FUNCTION mciSendString    LIB "WINMM.DLL"     ALIAS "mciSendStringA"    (lpstrCommand AS DWORD, lpstrReturnString AS DWORD, BYVAL uReturnLength AS DWORD, BYVAL hwndCallback AS DWORD) AS LONG
    
    
      sndOperate ("Open c:\windows\media\tada.wav")        
      sndOperate ("Play c:\windows\media\tada.wav")        
      SLEEP 1000
      sndOperate ("Close c:\windows\media\tada.wav")        
      
        
      ' Functions for sound handling
      FUNCTION sndOperate( sFile AS STRING ) AS LONG
    
        LOCAL Sound AS ASCIIZ * 255
    
        Sound = sFile
        mciSendString(STRPTR(Sound), NULL, NULL, NULL)
    
      END FUNCTION
    
    But this, although almost the same ... not :
      USES "UI"
    
      DECLARE FUNCTION mciSendString    LIB "WINMM.DLL"     ALIAS "mciSendStringA"    (lpstrCommand AS DWORD, lpstrReturnString AS DWORD, BYVAL uReturnLength AS DWORD, BYVAL hwndCallback AS DWORD) AS LONG
    
    
      sndOperate ("Open c:\windows\media\tada.wav")        
      sndOperate ("Play c:\windows\media\tada.wav")        
      SLEEP 1000
      sndOperate ("Close c:\windows\media\tada.wav")        
      
        
      ' Functions for sound handling
      FUNCTION sndOperate( sFile AS STRING ) AS LONG
    
        LOCAL Sound AS ASCIIZ * 255
    
        Sound = sFile
        mciSendString(STRPTR(Sound), NULL, NULL, NULL)
    
      END FUNCTION
    
    Any ideas ?

    Thanks,
    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  2. #2
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732

    UI module interference

    I apologize,

    with the official release all works as it should

    Thanks,
    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •