Programming Fundamentals - The MathWorks - #551

/ 840


catalogue search
P. 551
P. 552
P. 553
P. 554
P. 555
P. 556
P. 557
P. 558
P. 559
P. 560
P. 561
P. 562
P. 563
P. 564
P. 565
P. 566
P. 567
P. 568
P. 569
P. 570
P. 571
P. 572
P. 573
P. 574
P. 575
P. 576
P. 577
P. 578
P. 579
P. 580
P. 581
P. 582
P. 583
P. 584
P. 585
P. 586
P. 587
P. 588
P. 589
P. 590
P. 591
P. 592
P. 593
P. 594
P. 595
P. 596
P. 597
P. 598
P. 599
P. 600


See other catalogues for The MathWorks

Text version of the page
Working with Audio and Video Data
video data from files. Another way to import audio data into the MATLAB workspace is to record it using an audio input device, such as a microphone. The following sections describe
• "Reading Audioand VideoDatafromaFile"onpage6-93
• "Recording Audio Data" on page 6-93
Reading Audio and Video Data from a File
MATLAB includes several functions for reading audio or video data from a file. These files are format-specific.
• auread — Returns sound data from a sound (AU) file
• aviread — Returns AVI data as a MATLAB movie
• mmreader — Returns AVI, MPG, or WMV video data
• wavread — Returns sound data from a sound (WAV) file
Note You can use mmreader only on Microsoft Windows systems.
Recording Audio Data
To bring sound data into the MATLAB workspace by recording it from an audio input device, use the audio recorder object. This object represents the connection between MATLAB and an audio input device, such as a microphone, that is connected to your system. You use the audiorecorder function to create this object, and then you use methods and properties of theobjecttorecordtheaudiodata.
On PCs running the Windows operating system, you also can use the wavrecord function to bring live audio data in WAV format into the MATLAB workspace.
Once you import audio data, MATLAB supports several ways to listen to the data. You can use an audio player object to play the audio data. Use the audioplayer function to create an audio player object.
6-93

pageCatalog pdf di En 2012-06-22-01