-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathvoice_over.cpp
47 lines (38 loc) · 1.59 KB
/
voice_over.cpp
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
#include <iostream>
#include <sstream>
#include "adm/adm.hpp"
#include "adm/utilities/object_creation.hpp"
#include "adm/write.hpp"
int main() {
using namespace adm;
// create ADM elements
auto programme = AudioProgramme::create(AudioProgrammeName("Programme"));
auto programmeVoiceOver =
AudioProgramme::create(AudioProgrammeName("Programme - Voice Over"));
auto speechContent = AudioContent::create(AudioContentName("Speech"));
auto speechDuckedContent =
AudioContent::create(AudioContentName("Speech Ducked"));
auto voiceOverContent = AudioContent::create(AudioContentName("Voice Over"));
auto speech = createSimpleObject("Speech");
auto speechDucked = createSimpleObject("Speech Ducked");
auto voiceOver = createSimpleObject("Voice Over");
speech.audioChannelFormat->add(AudioBlockFormatObjects(SphericalPosition()));
speechDucked.audioChannelFormat->add(
AudioBlockFormatObjects(SphericalPosition()));
voiceOver.audioChannelFormat->add(
AudioBlockFormatObjects(SphericalPosition()));
programme->addReference(speechContent);
programmeVoiceOver->addReference(speechDuckedContent);
programmeVoiceOver->addReference(voiceOverContent);
speechContent->addReference(speech.audioObject);
speechDuckedContent->addReference(speechDucked.audioObject);
voiceOverContent->addReference(voiceOver.audioObject);
auto admDocument = Document::create();
admDocument->add(programme);
admDocument->add(programmeVoiceOver);
// write XML data to stdout
std::stringstream xmlStream;
writeXml(xmlStream, admDocument);
std::cout << xmlStream.str();
return 0;
}