Common subdirectories: scummvm/CVS and scummvm.new/CVS
diff -u scummvm/Makefile scummvm.new/Makefile
old
|
new
|
|
2 | 2 | |
3 | 3 | CC = gcc |
4 | 4 | CFLAGS = -g -Wno-multichar |
| 5 | |
| 6 | #Replace -DUSE_TIMIDITY with -DUSE_RAWMIDI for music on a raw midi device |
| 7 | #in unix |
| 8 | # |
5 | 9 | DEFINES = -DUNIX -DHAVE_READLINE -DUSE_TIMIDITY |
| 10 | |
6 | 11 | LDFLAGS := |
7 | 12 | INCLUDES:= `sdl-config --cflags` |
8 | 13 | CPPFLAGS= $(DEFINES) $(INCLUDES) |
diff -u scummvm/imuse.cpp scummvm.new/imuse.cpp
old
|
new
|
|
2471 | 2471 | |
2472 | 2472 | #define MIDI_OUT(a,b) midiOutShortMsg((HMIDIOUT)(a), (b)) |
2473 | 2473 | |
| 2474 | #elif defined(USE_RAWMIDI) |
| 2475 | static int open_rawmidi_device() |
| 2476 | { |
| 2477 | int device; |
| 2478 | device = (open((getenv("SCUMMVM_MIDI")), O_RDWR, 0)); |
| 2479 | if (device < 0){ |
| 2480 | printf("Cannot open rawmidi device - using /dev/null (no music will be heard)\n"); |
| 2481 | device = (open(("/dev/null"), O_RDWR, 0)); |
| 2482 | if (device < 0) |
| 2483 | error("Cannot open /dev/null to dump midi output"); |
| 2484 | } |
| 2485 | return device; |
| 2486 | } |
| 2487 | |
| 2488 | void SoundEngine::midiInit() |
| 2489 | { |
| 2490 | int device; |
| 2491 | device = open_rawmidi_device(); |
| 2492 | _mo = (void *) device; |
| 2493 | } |
| 2494 | |
| 2495 | static inline void MIDI_OUT(void *a, int b) { |
| 2496 | int device = (int) a; |
| 2497 | unsigned char buf[256]; |
| 2498 | int position = 0; |
| 2499 | |
| 2500 | switch (b & 0xF0) { |
| 2501 | case 0x80: |
| 2502 | case 0x90: |
| 2503 | case 0xA0: |
| 2504 | case 0xB0: |
| 2505 | case 0xE0: |
| 2506 | buf[position++] = b; |
| 2507 | buf[position++] = (b >> 8) & 0x7F; |
| 2508 | buf[position++] = (b >> 16) & 0x7F; |
| 2509 | break; |
| 2510 | case 0xC0: |
| 2511 | case 0xD0: |
| 2512 | buf[position++] = b; |
| 2513 | buf[position++] = (b >> 8) & 0x7F; |
| 2514 | break; |
| 2515 | default: |
| 2516 | fprintf(stderr, "Unknown : %08x\n", b); |
| 2517 | break; |
| 2518 | } |
| 2519 | write(device, buf, position); |
| 2520 | } |
| 2521 | |
2474 | 2522 | #elif defined(USE_TIMIDITY) |
2475 | 2523 | |
2476 | 2524 | static int connect_to_timidity(int port) |
diff -u scummvm/readme.txt scummvm.new/readme.txt
old
|
new
|
|
20 | 20 | |
21 | 21 | GCC: |
22 | 22 | ---- |
| 23 | * If you need to, to change music settings, edit the file 'Makefile' as per the instructions for either raw midi output or timidity output later in this readme |
23 | 24 | * Type make (or gmake if that's what GNU make is called on your system) and |
24 | 25 | hopefully ScummVM will compile for you. |
25 | 26 | |
… |
… |
|
42 | 43 | Ctrl-s shows memory consumption. |
43 | 44 | |
44 | 45 | |
45 | | Playing sound with Timidity: |
| 46 | Playing music in Unix with a raw midi device (/dev/midi): |
| 47 | ---------------------------------------------------------- |
| 48 | Edit the Makefile and make sure on the line "DEFINES", there is -DUSE_RAWMIDI listed. If there is -DUSE_TIMIDITY, replace it (unless you want to use timidity for music -- i.e. your soundcard does not have a working midi device). |
| 49 | Compile scummvm by typing "make" (or possibly "gmake" depending on your system configuration) |
| 50 | Before you run scummvm, make sure you have the environment variable SCUMMVM_MIDI set to your midi device (usually /dev/midi). In bash, this is done as follows |
| 51 | |
| 52 | $ SCUMMVM_MIDI="/dev/midi" && export SCUMMVM_MIDI |
| 53 | |
| 54 | Then you can run scummvm, and hopefully you will hear music out your midi device |
| 55 | |
| 56 | |
| 57 | Playing music in Unix with Timidity: |
46 | 58 | ---------------------------- |
| 59 | Edit the Makefile and make sure on the line "DEFINES" there is -DUSE_TIMIDITY listed. If there is -DUSE_RAWMIDI, replace it (unless you want to use a raw midi device for music) |
| 60 | Compile scummvm by typing "make" (or possibly "gmake" depending on youru system configuration) |
47 | 61 | Start Timidity with the following command line : |
48 | 62 | |
49 | 63 | $ timidity -irv 7777 |
… |
… |
|
53 | 67 | |
54 | 68 | Good Luck, |
55 | 69 | Ludvig Strigeus |
56 | | |
57 | | |
58 | | |
59 | | |
60 | | |
61 | | |
62 | | |
63 | | |
64 | | |
65 | | |
66 | | |