~ubuntu-branches/ubuntu/trusty/portmidi/trusty

« back to all changes in this revision

Viewing changes to pm_mac/pmmac.c

  • Committer: Bazaar Package Importer
  • Author(s): Paul Brossier
  • Date: 2009-09-16 06:50:57 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20090916065057-lz24lbrrygyev85b
Tags: 1:131-1
* New upstream version, uses epoch (closes: #501132)
* debian/watch: update to match new download location and version
  numbering (closes: #450055), but still fails due to zip format
* Add depends on quilt, move patches to debian/patches
* Add Homepage to debian/control
* debian/control: use ${binary:Version}, bump to S-V 3.8.3
* debian/compat: bump to 5
* debian/copyright: update to match license.txt and add missing copyrights
* debian/patches/02_pmlinuxalsa.diff: remove merged hunks
* debian/patches/04_ptlinux.diff: remove merged hunks
* debian/patches/05_makefile.diff: merge and link portmidi to porttime,
  thanks to Willem van Engen (closes: #515712)
* debian/rules: use pm_linux/Makefile, ship CHANGELOG.txt and make sure
  source and header files are not executable
* debian/README.source: refer to quilt documentation
* debian/libportmidi-dev.install: do not try to install unexisting files
* debian/patches/{06_pm_test_mm,07_pm_test_sysex,08_pm_test_qtest}.diff:
  get rid of missing include and parenthesis, fix long int formatting
* debian/rules: do not compress header files

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
 
12
12
#include "stdlib.h"
13
13
#include "portmidi.h"
 
14
#include "pmutil.h"
 
15
#include "pminternal.h"
14
16
#include "pmmacosxcm.h"
15
17
 
16
 
PmError pm_init()
 
18
PmDeviceID pm_default_input_device_id = -1;
 
19
PmDeviceID pm_default_output_device_id = -1;
 
20
 
 
21
void pm_init()
17
22
{
18
 
    return pm_macosxcm_init();
 
23
    PmError err = pm_macosxcm_init();
 
24
    // this is set when we return to Pm_Initialize, but we need it
 
25
    // now in order to (successfully) call Pm_CountDevices()
 
26
    pm_initialized = TRUE;
 
27
    if (!err) {
 
28
        pm_default_input_device_id = find_default_device(
 
29
                "/PortMidi/PM_RECOMMENDED_INPUT_DEVICE", TRUE, 
 
30
                pm_default_input_device_id);
 
31
        pm_default_output_device_id = find_default_device(
 
32
                "/PortMidi/PM_RECOMMENDED_OUTPUT_DEVICE", FALSE, 
 
33
                pm_default_output_device_id);
 
34
    }
19
35
}
20
36
 
 
37
 
21
38
void pm_term(void)
22
39
{
23
40
    pm_macosxcm_term();
24
41
}
25
42
 
26
 
PmDeviceID pm_default_input_device_id = -1;
27
 
PmDeviceID pm_default_output_device_id = -1;
28
43
 
29
44
PmDeviceID Pm_GetDefaultInputDeviceID()
30
45
{
 
46
    Pm_Initialize();
31
47
    return pm_default_input_device_id;
32
48
}
33
49
 
34
50
PmDeviceID Pm_GetDefaultOutputDeviceID() {
 
51
    Pm_Initialize();
35
52
    return pm_default_output_device_id;
36
53
}
37
54