Join/Login

Business Software

Open Source Software

For Vendors

Blog

About

More

Articles

Create

SourceForge Podcast

Site Documentation

Subscribe to our Newsletter

Support Request

For Vendors Help Create Join Login

Business Software

Open Source Software

SourceForge Podcast

Resources

Articles

Case Studies

Blog

Menu

Help

Create

Join

Login

Home

Browse

OpenDAFF

Code

OpenDAFF Code

Directional Audio File Format

Brought to you by: fwefers, jstienen, laspoeck

Summary

Files

Reviews

Support

Code

Mailing Lists

OpenDAFF official website

Menu ▾ ▴

Browse Commits

Fork

Merge Requests 0

Forks 1

Branches

master

develop

[cf9d93]: / bindings / matlab / build_Matlab_DAFF.m  Maximize  Restore  History

Download this file

82 lines (69 with data), 2.9 kB

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81

%

% -------------------------------------------------------------------------------------

%

% OpenDAFF - A free, open source software package for directional audio data

% OpenDAFF is distributed under the terms of the GNU Lesser Public License (LGPL)

%

% Copyright (c) Institute of Technical Acoustics, RWTH Aachen University, 2009-2016

%

% ------------------------------------------------------------------------------------

%

% Visit the OpenDAFF homepage: http://www.opendaff.org

%

% ------------------------------------------------------------------------------------

%

% License and warranty notes

%

% OpenDAFF is free software, distributed under the terms of the

% GNU Lesser General Public License (LGPL) version 3.

% You can redistribute it and/or modify it under the terms of the

% GNU Lesser General Public License (LGPL) version 3,

% as published by the Free Software Foundation.

%

% This program is distributed in the hope that it will be useful,

% but WITHOUT ANY WARRANTY; without even the implied warranty of

% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

% See the GNU General Public License for more details.

%

% You should have received a copy of the GNU General Public License

% along with this program. If not, see <http://www.gnu.org/licenses/>.

%

% ------------------------------------------------------------------------------------

%

%

clear all;

clc;

% Determine the C++ compiler configuration

cxx = mex.getCompilerConfigurations('C++', 'Selected');

if isempty(cxx)

error('No C++ compiler installed or selected for Matlab. Please run ''mex -setup''.');

end

% --= Options =--

% Output directory

outdir = '../../matlab';

% Output file

outfile = fullfile(outdir, ['DAFF.' mexext]);

% Source files

srcs = {'DAFFMEX.cpp', ...

'Helpers.cpp', ...

'../../src/DAFFReader.cpp', ...

'../../src/DAFFReaderImpl.cpp', ...

'../../src/DAFFMetadataImpl.cpp', ...

'../../src/DAFFSCTransform.cpp', ...

'../../src/DAFFUtils.cpp', ...

'../../src/Utils.cpp'};

% ---------------

fprintf('Building OpenDAFF Matlab extension using ''%s''...\n', cxx.Name)

% Create the destination directory if it does not exist

if ~exist(outdir, 'dir'), mkdir(outdir); end

% Compile and link

srcs = fullfile(srcs);

srcs = sprintf('%s ', srcs{:});

% Note: We need to call mex via 'system' here, because we used the symbol

% 'mex' with '.' above and Matlab would complain when doing 'mex ...'

cmd = sprintf('mex -O -I../../include -I../../src %s -output %s', ...

srcs, outfile);

% Debug: disp(cmd);

[errorcode, result] = system(cmd, '-echo');

if (errorcode ~= 0), error('Building OpenDAFF Matlab extension failed'); end;

fprintf('\nOpenDAFF Matlab extension successfully built!\n\nOutput MEX file: ''%s''\n\n', outfile)

SourceForge

Create a Project

Open Source Software

Business Software

Top Downloaded Projects

Company

About

Team

SourceForge Headquarters
225 Broadway Suite 1600
San Diego, CA 92101
+1 (858) 422-6466

Resources

Support

Site Documentation

Site Status

SourceForge Reviews

© 2025 Slashdot Media. All Rights Reserved.

Terms Privacy Opt Out Advertise

×
Want the latest updates on software, tech news, and AI?

Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.

Submit