RSJobs works for me if I do any of the following:
@($Track1,$Track2) | Start-RSJob -Name {$_.Name} -ScriptBlock {
Set-location C:\Users\me\Documents\PowerShellProjects\
.\Play-notes.ps1 $_.Track
} | Get-RSJob | Wait-RSJob | Receive-RSJob
Get-RSJob | Remove-RSJob -Force
@($Track1,$Track2) | Start-RSJob -Name {$_.Name} -ScriptBlock {
Import-Module C:\Users\me\Documents\PowerShellProjects\Play-notes.ps1
Play-Notes -Notes $_.Track
} | Get-RSJob | Wait-RSJob | Receive-RSJob
Get-RSJob | Remove-RSJob -Force
Without these changes, I got no sound. With these changes, the sounds played over the top of each other. I hope this helps, I think this function is awesome.
RSJobs works for me if I do any of the following:
Without these changes, I got no sound. With these changes, the sounds played over the top of each other. I hope this helps, I think this function is awesome.