CN113596704A - Real-time space directional stereo decoding method - Google Patents
Real-time space directional stereo decoding method Download PDFInfo
- Publication number
- CN113596704A CN113596704A CN202010366595.8A CN202010366595A CN113596704A CN 113596704 A CN113596704 A CN 113596704A CN 202010366595 A CN202010366595 A CN 202010366595A CN 113596704 A CN113596704 A CN 113596704A
- Authority
- CN
- China
- Prior art keywords
- sound
- format
- creating
- reading
- coordinate
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 17
- 230000002452 interceptive effect Effects 0.000 claims abstract description 13
- 239000011800 void material Substances 0.000 claims description 6
- 230000005540 biological transmission Effects 0.000 claims description 3
- 230000000694 effects Effects 0.000 abstract description 8
- 230000003993 interaction Effects 0.000 description 2
- 230000007547 defect Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04S—STEREOPHONIC SYSTEMS
- H04S3/00—Systems employing more than two channels, e.g. quadraphonic
- H04S3/008—Systems employing more than two channels, e.g. quadraphonic in which the audio signals are in digital form, i.e. employing more than two discrete digital channels
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04S—STEREOPHONIC SYSTEMS
- H04S7/00—Indicating arrangements; Control arrangements, e.g. balance control
- H04S7/30—Control circuits for electronic adaptation of the sound field
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04S—STEREOPHONIC SYSTEMS
- H04S2400/00—Details of stereophonic systems covered by H04S but not provided for in its groups
- H04S2400/13—Aspects of volume control, not necessarily automatic, in stereophonic sound systems
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04S—STEREOPHONIC SYSTEMS
- H04S2420/00—Techniques used stereophonic systems covered by H04S but not provided for in its groups
- H04S2420/03—Application of parametric coding in stereophonic audio systems
Abstract
The invention relates to a real-time space directional stereo decoding method; the decoding method is characterized by comprising the following steps of 1, creating and controlling a sound object; step 2, using and playing the sound object: step 3, creating and setting audience objects: step 4, making spatial stereo; step 5, decoding and playing the sound; step 6, converting the audio format into a format which can be identified by OpenAL; step 7, determining the number of sound channels; step 8, determining the sound corresponding to the channel; and 9, creating a position coordinate sent by a udp receiving object receiving interactive program, sending the coordinate to a sound object and an audience object, obtaining the sound coordinate by an audio program, immediately assigning the sound coordinate to the position of the sound object, and playing the corresponding sound object to hear the sound at the corresponding position. The invention provides a method for generating a stereo sound effect in a space with low cost, thereby achieving the purposes of enriching the content of an exhibition item and improving the interactive experience of audiences.
Description
Technical Field
The invention relates to the field of space stereo playing equipment, in particular to a real-time space directional stereo decoding method.
Background
With the development of video and video projection technology, the contents of exhibition items of exhibition halls and the like are extremely rich, and multimedia interactive exhibition items combining videos, sounds, animations and the like become popular. However, most of the traditional expansion terms are dual-channel sound, and the position and the size of the sound are not clear. And thus cannot provide the audience with an immersive experience.
Disclosure of Invention
The invention aims to overcome the defects and provide a method for generating a stereo sound effect in a space with low cost, so that the purposes of enriching the content of an exhibition item and improving the interactive experience of audiences are achieved.
In order to achieve the above object, the present invention is realized by:
a real-time spatial directional stereo decoding method; the system comprises a PC host with a sound card as a player, and further comprises a power amplifier and a sound component, wherein the power amplifier and the sound component are connected with the PC host through an HDMI (high-definition multimedia interface) wire, and the sound component comprises two front-mounted sounds, two ceiling sounds, two rear-mounted sounds, a middle-mounted sound and a subwoofer; characterized in that the decoding method comprises
Step 1, creating and controlling a sound object: adopting OpenAL to create and manage a sound object, and inputting a space position coordinate to control the sound object;
step 1.1, the concrete realization of the sound object:
1) reading the sound file;
2) reading the sound data into the buffer;
3) reading the sound format;
4) creating an OpenAL context;
5) creating an OpenAL sound object;
6) copying the sound data buffer to the OpenAL sound object;
step 2, using and playing the sound object:
step 2.1, execute with the following code
sound [0] - > setLoop (true)// set loop play sound;
sound [0] - > play (),/play sound;
sound [0] - > setSource (x, y, z)// set sound location, where xyz is the location coordinate of udp message transmission
Step 3, creating and setting audience objects:
step 3.1, execute with the following code
void initListener () {// create audience
float vec[6] = { 0.0, 0.0, -1.0, 0.0, 1.0, 0.0 };
alListenerfv(AL_ORIENTATION, vec);
alListener3f(AL_POSITION, 0.0, 0.0, 0.0);
}
void setListener (float x, float y, float z) {// set listener position
alListener3f(AL_POSITION, x, y, z);
}
Step 4, making spatial stereo, namely performing stereo coding by adopting Steinberg Nuendio 10 coding software and a stereo card;
step 5, decoding and playing the sound;
step 5.1, reading an audio file:
1) reading the sound file to the memory according to the path;
2) obtaining a file header from the read memory;
3) analyzing the sound format according to the file header;
4) analyzing the voice data according to the read content;
5) copying the sound data to the buffer;
step 6, analyzing the audio format: converting audio format to format recognizable by OpenAL
Step 7, determining the number of sound channels by reading nChannels of the sound format;
step 8, reading dwChannelMask in a sound format to determine a sound device corresponding to a channel;
step 9, playing control: and creating a position coordinate sent by a udp receiving object receiving interactive program, sending the coordinate to a sound object and an audience object, and immediately assigning the sound coordinate to the position of the sound object and playing the corresponding sound object by the audio program so as to hear the sound at the corresponding position.
The decoding method adopts a multi-channel stereo technology in the field of computers, synthesizes stereo effect through a stereo card, and simultaneously uses a special playing program to take charge of sound decoding so as to generate stereo sound effect in space; the 3d stereo sound effect is creatively applied to the interactive exhibition item, so that the content of the exhibition item is enriched, and the interactive experience of audiences is improved; spatial directional stereo is a new sound scheme, which increases the concept of sound objects compared to common multi-channel sound, creates and moves sound objects in an interactive program, and the sound objects can control the volume of a plurality of sound channels, thereby providing an immersive experience for the audience during interaction.
Drawings
Fig. 1 is a schematic diagram illustrating the operation process of the stereo decoding method.
Detailed Description
The invention is further illustrated by the following specific examples.
As shown in fig. 1, a real-time spatial directional stereo decoding method; the system comprises a PC host with a sound card as a player, and further comprises a power amplifier and a sound component, wherein the power amplifier and the sound component are connected with the PC host through an HDMI (high-definition multimedia interface) wire, and the sound component comprises two front-mounted sounds, two ceiling sounds, two rear-mounted sounds, a middle-mounted sound and a subwoofer; characterized in that the decoding method comprises
Step 1, creating and controlling a sound object: adopting OpenAL to create and manage a sound object, and inputting a space position coordinate to control the sound object;
step 1.1, the concrete realization of the sound object:
1) reading the sound file;
2) reading the sound data into the buffer;
3) reading the sound format;
4) creating an OpenAL context;
5) creating an OpenAL sound object;
6) copying the sound data buffer to the OpenAL sound object;
step 2, using and playing the sound object:
step 2.1, execute with the following code
sound [0] - > setLoop (true)// set loop play sound;
sound [0] - > play (),/play sound;
sound [0] - > setSource (x, y, z)// set sound location, where xyz is the location coordinate of udp message transmission
Step 3, creating and setting audience objects:
step 3.1, execute with the following code
void initListener () {// create audience
float vec[6] = { 0.0, 0.0, -1.0, 0.0, 1.0, 0.0 };
alListenerfv(AL_ORIENTATION, vec);
alListener3f(AL_POSITION, 0.0, 0.0, 0.0);
}
void setListener (float x, float y, float z) {// set listener position
alListener3f(AL_POSITION, x, y, z);
}
Step 4, making spatial stereo, namely performing stereo coding by adopting Steinberg Nuendio 10 coding software and a stereo card;
step 5, decoding and playing the sound;
step 5.1, reading an audio file:
1) reading the sound file to the memory according to the path;
2) obtaining a file header from the read memory;
3) analyzing the sound format according to the file header;
4) analyzing the voice data according to the read content;
5) copying the sound data to the buffer;
step 6, analyzing the audio format: converting audio format to format recognizable by OpenAL
Step 7, determining the number of sound channels by reading nChannels of the sound format;
step 8, reading dwChannelMask in a sound format to determine a sound device corresponding to a channel;
step 9, playing control: and creating a position coordinate sent by a udp receiving object receiving interactive program, sending the coordinate to a sound object and an audience object, and immediately assigning the sound coordinate to the position of the sound object and playing the corresponding sound object by the audio program so as to hear the sound at the corresponding position.
The decoding method adopts a multi-channel stereo technology in the field of computers, synthesizes stereo effect through a stereo card, and simultaneously uses a special playing program to take charge of sound decoding so as to generate stereo sound effect in space; the 3d stereo sound effect is creatively applied to the interactive exhibition item, so that the content of the exhibition item is enriched, and the interactive experience of audiences is improved; spatial directional stereo is a new sound scheme, which increases the concept of sound objects compared to common multi-channel sound, creates and moves sound objects in an interactive program, and the sound objects can control the volume of a plurality of sound channels, thereby providing an immersive experience for the audience during interaction.
Claims (1)
1. A real-time spatial directional stereo decoding method; the system comprises a PC host with a sound card as a player, and further comprises a power amplifier and a sound component, wherein the power amplifier and the sound component are connected with the PC host through an HDMI (high-definition multimedia interface) wire, and the sound component comprises two front-mounted sounds, two ceiling sounds, two rear-mounted sounds, a middle-mounted sound and a subwoofer; characterized in that the decoding method comprises
Step 1, creating and controlling a sound object: adopting OpenAL to create and manage a sound object, and inputting a space position coordinate to control the sound object;
step 1.1, the concrete realization of the sound object:
1) reading the sound file;
2) reading the sound data into the buffer;
3) reading the sound format;
4) creating an OpenAL context;
5) creating an OpenAL sound object;
6) copying the sound data buffer to the OpenAL sound object;
step 2, using and playing the sound object:
step 2.1, execute with the following code
sound [0] - > setLoop (true)// set loop play sound;
sound [0] - > play (),/play sound;
sound [0] - > setSource (x, y, z)// set sound location, where xyz is the location coordinate of udp message transmission
Step 3, creating and setting audience objects:
step 3.1, execute with the following code
void initListener () {// create audience
float vec[6] = { 0.0, 0.0, -1.0, 0.0, 1.0, 0.0 };
alListenerfv(AL_ORIENTATION, vec);
alListener3f(AL_POSITION, 0.0, 0.0, 0.0);
}
void setListener (float x, float y, float z) {// set listener position
alListener3f(AL_POSITION, x, y, z);
}
Step 4, making spatial stereo, namely performing stereo coding by adopting Steinberg Nuendio 10 coding software and a stereo card;
step 5, decoding and playing the sound;
step 5.1, reading an audio file:
1) reading the sound file to the memory according to the path;
2) obtaining a file header from the read memory;
3) analyzing the sound format according to the file header;
4) analyzing the voice data according to the read content;
5) copying the sound data to the buffer;
step 6, analyzing the audio format: converting audio format to format recognizable by OpenAL
Step 7, determining the number of sound channels by reading nChannels of the sound format;
step 8, reading dwChannelMask in a sound format to determine a sound device corresponding to a channel;
step 9, playing control: and creating a position coordinate sent by a udp receiving object receiving interactive program, sending the coordinate to a sound object and an audience object, and immediately assigning the sound coordinate to the position of the sound object and playing the corresponding sound object by the audio program so as to hear the sound at the corresponding position.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010366595.8A CN113596704A (en) | 2020-04-30 | 2020-04-30 | Real-time space directional stereo decoding method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010366595.8A CN113596704A (en) | 2020-04-30 | 2020-04-30 | Real-time space directional stereo decoding method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113596704A true CN113596704A (en) | 2021-11-02 |
Family
ID=78237521
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010366595.8A Pending CN113596704A (en) | 2020-04-30 | 2020-04-30 | Real-time space directional stereo decoding method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113596704A (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101118777A (en) * | 2007-08-22 | 2008-02-06 | 北京中星微电子有限公司 | Playing method of multimedia container format file and indexes reading method thereof |
CN101452723A (en) * | 2008-10-16 | 2009-06-10 | 北京光线传媒有限公司 | Media file playing method, playing system and media player |
CN101964202A (en) * | 2010-09-09 | 2011-02-02 | 南京中兴特种软件有限责任公司 | Audio data file playback processing method mixed with multiple encoded formats |
US20120263307A1 (en) * | 2011-04-12 | 2012-10-18 | International Business Machines Corporation | Translating user interface sounds into 3d audio space |
CN103649706A (en) * | 2011-03-16 | 2014-03-19 | Dts(英属维尔京群岛)有限公司 | Encoding and reproduction of three dimensional audio soundtracks |
CN104793917A (en) * | 2015-02-10 | 2015-07-22 | 西南民族大学 | Method for obtaining Cocos2d-x game playing sound in real time |
CN105163240A (en) * | 2015-09-06 | 2015-12-16 | 珠海全志科技股份有限公司 | Playing device and sound effect adjusting method |
-
2020
- 2020-04-30 CN CN202010366595.8A patent/CN113596704A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101118777A (en) * | 2007-08-22 | 2008-02-06 | 北京中星微电子有限公司 | Playing method of multimedia container format file and indexes reading method thereof |
CN101452723A (en) * | 2008-10-16 | 2009-06-10 | 北京光线传媒有限公司 | Media file playing method, playing system and media player |
CN101964202A (en) * | 2010-09-09 | 2011-02-02 | 南京中兴特种软件有限责任公司 | Audio data file playback processing method mixed with multiple encoded formats |
CN103649706A (en) * | 2011-03-16 | 2014-03-19 | Dts(英属维尔京群岛)有限公司 | Encoding and reproduction of three dimensional audio soundtracks |
US20120263307A1 (en) * | 2011-04-12 | 2012-10-18 | International Business Machines Corporation | Translating user interface sounds into 3d audio space |
CN104793917A (en) * | 2015-02-10 | 2015-07-22 | 西南民族大学 | Method for obtaining Cocos2d-x game playing sound in real time |
CN105163240A (en) * | 2015-09-06 | 2015-12-16 | 珠海全志科技股份有限公司 | Playing device and sound effect adjusting method |
Non-Patent Citations (4)
Title |
---|
俞锫: "《数字音频编辑》", 30 May 2009, 中国传媒大学出版社 * |
冯哲: "台式飞行实时仿真技术及其实现研究", 《中国优秀硕士学位论文全文数据库信息科技辑》 * |
杨珠敏: "基于OpenAL的三维音效技术的研究", 《河北工业大学学报》 * |
黎国进: "基于虚拟现实的三维音效与力反馈技术研究与实现", 《中国优秀硕士学位论文全文数据库 信息科技辑》 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
RU2741738C1 (en) | System, method and permanent machine-readable data medium for generation, coding and presentation of adaptive audio signal data | |
KR101805212B1 (en) | Object-oriented audio streaming system | |
US9858932B2 (en) | Processing of time-varying metadata for lossless resampling | |
CN114915874A (en) | Audio processing method, apparatus, device, medium, and program product | |
CN113596704A (en) | Real-time space directional stereo decoding method | |
CN114339297B (en) | Audio processing method, device, electronic equipment and computer readable storage medium | |
CN213426468U (en) | Interactive display system of space directive stereo sound | |
Baume et al. | Scaling New Heights in Broadcasting using Ambisonics | |
US20230283977A1 (en) | Audio Scene Description and Control | |
Laine | Cinematic music creation in Dolby Atmos: producing and mixing contemporary cinematic music in immersive audio | |
CN114023339A (en) | Audio-bed-based audio packet format metadata and generation method, device and medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20211102 |
|
RJ01 | Rejection of invention patent application after publication |