Last change
on this file since 1118 was 1114, checked in by iritscen, 5 years ago |
Adding OniSplit source code (v0.9.99.0). Many thanks to Neo for all his work over the years.
|
File size:
1.1 KB
|
Line | |
---|
1 | using System;
|
---|
2 | using System.Xml;
|
---|
3 | using Oni.Metadata;
|
---|
4 | using Oni.Xml;
|
---|
5 |
|
---|
6 | namespace Oni.Sound
|
---|
7 | {
|
---|
8 | internal sealed class OsbdXmlImporter : RawXmlImporter
|
---|
9 | {
|
---|
10 | public OsbdXmlImporter(XmlReader reader, BinaryWriter writer)
|
---|
11 | : base(reader, writer)
|
---|
12 | {
|
---|
13 | }
|
---|
14 |
|
---|
15 | public void Import()
|
---|
16 | {
|
---|
17 | switch (Xml.LocalName)
|
---|
18 | {
|
---|
19 | case "AmbientSound":
|
---|
20 | Import(SoundMetadata.OSAm, SoundMetadata.osam6);
|
---|
21 | break;
|
---|
22 |
|
---|
23 | case "ImpulseSound":
|
---|
24 | Import(SoundMetadata.OSIm, SoundMetadata.osim6);
|
---|
25 | break;
|
---|
26 |
|
---|
27 | case "SoundGroup":
|
---|
28 | Import(SoundMetadata.OSGr, SoundMetadata.osgr6);
|
---|
29 | break;
|
---|
30 | }
|
---|
31 | }
|
---|
32 |
|
---|
33 | private void Import(int tag, MetaStruct type)
|
---|
34 | {
|
---|
35 | Xml.ReadStartElement();
|
---|
36 |
|
---|
37 | BeginStruct(0);
|
---|
38 |
|
---|
39 | Writer.Write(tag);
|
---|
40 | Writer.Write(0);
|
---|
41 | Writer.Write(6);
|
---|
42 |
|
---|
43 | ReadStruct(type);
|
---|
44 | }
|
---|
45 | }
|
---|
46 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.