Skip to content

Commit e2648d9

Browse files
authored
Merge pull request #7 from nextflow-io/claude/investigate-issue-3-01VTdDE4CVdvHKGLQ47LZECd
2 parents c45e0a1 + 595bac3 commit e2648d9

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,20 @@ nextflow run doom
88

99
> [!NOTE]
1010
> All credit for the Java implementation go to this project: https://github.com/gaborbata/vanilla-mocha-doom
11+
12+
## Troubleshooting
13+
14+
### Sound error: NullPointerException
15+
16+
If you see an error like:
17+
18+
```
19+
Cannot invoke "javax.sound.midi.Receiver.send(javax.sound.midi.MidiMessage, long)" because "receiver" is null
20+
```
21+
22+
This occurs on systems without MIDI audio devices. Run with `--nomusic` to disable music only, or `--nosound` to disable all audio:
23+
24+
```bash
25+
nextflow run doom --nomusic # Disable music only
26+
nextflow run doom --nosound # Disable all sound
27+
```

main.nf

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#!/usr/bin/env nextflow
22

3+
params.nomusic = false
4+
params.nosound = false
5+
36
process printLogo {
47
output:
58
stdout
@@ -71,8 +74,9 @@ process playDoom {
7174
val true
7275

7376
script:
77+
def soundFlags = params.nosound ? '-nosound' : (params.nomusic ? '-nomusic' : '')
7478
"""
75-
java -jar $projectDir/lib/mochadoom.jar -iwad $projectDir/doom1.wad
79+
java -jar $projectDir/lib/mochadoom.jar -iwad $projectDir/doom1.wad $soundFlags
7680
"""
7781
}
7882

0 commit comments

Comments
 (0)