Skip to content

Attempt at a Multi-Track example using the PoshRsJobs Module #1

@ghost

Description

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions