Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. DirectX AudioVideoPlayback: LoaderLock

DirectX AudioVideoPlayback: LoaderLock

Scheduled Pinned Locked Moved Visual Basic
graphicsgame-devdata-structuresquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    codemunkeh
    wrote on last edited by
    #1

    Written an app to play some sounds for me, in time with a text file I've got displayed. Uses Microsoft.DirectX.AudioVideoPlayback (April 07 SDK I believe) and consists of an array of 7 Audio objects, where each is set to a particular file by the following:

    Imports DXAV = Microsoft.DirectX.AudioVideoPlayback

    Dim audioTracks(7) As DXAV.Audio

    Private Sub SetSound(ByVal trackID As Byte, ByVal soundName As String)
    Dim soundFullName As String = soundPath & soundName & soundExt ' Builds full filename
    If IO.File.Exists(soundFullName) Then
    audioTracks(trackID) = New DXAV.Audio(soundFullName)
    Else
    MsgBox("File not found: " & soundFullName & ".", MsgBoxStyle.Exclamation)
    End If
    End Sub

    The actual play/stop actions are simply audioTracks(trackID).Play() and Stop() calls. However, when I run this, the audioTracks(trackID) = New DXAV.Audio(soundFullName) fails because: DLL 'C:\..dahdahdah..\Microsoft.DirectX.dll' is attempting managed execution inside OS Loader lock. I've seen LoaderLocks when using multi-threaded apps with calls to Me.Controls but my app is single-threaded.

    Ninja (the Nerd)
    Confused? You will be...

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups