Ignore:
Timestamp:
Mar 24, 2006 8:41:20 PM (18 years ago)
Author:
bennylp
Message:

Added WAVE writer and resample port, and also found out why audio quality is poor with DirectSound?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/include/pjmedia/file_port.h

    r222 r358  
    2727 
    2828 
     29 
    2930PJ_BEGIN_DECL 
    3031 
    3132 
    3233/** 
    33  * Create file player port. 
     34 * Create a media port to play streams from a WAV file. 
     35 * 
     36 * @param pool          Pool to create memory buffers for this port. 
     37 * @param filename      File name to open. 
     38 * @param flags         Port creation flags. 
     39 * @param buf_size      Buffer size to be allocated. If the value is zero or 
     40 *                      negative, the port will use default buffer size (which 
     41 *                      is about 4KB). 
     42 * @param user_data     User data to be associated with the file player port. 
     43 * @param p_port        Pointer to receive the file port instance. 
     44 * 
     45 * @return              PJ_SUCCESS on success. 
    3446 */ 
    3547PJ_DECL(pj_status_t) pjmedia_file_player_port_create( pj_pool_t *pool, 
     
    4254 
    4355 
     56/** 
     57 * Create a media port to record streams to a WAV file. Note that the port 
     58 * must be closed properly (with #pjmedia_port_destroy()) so that the WAV 
     59 * header can be filled with correct values (such as the file length). 
     60 * 
     61 * @param pool          Pool to create memory buffers for this port. 
     62 * @param filename      File name. 
     63 * @param flags         Port creation flags. 
     64 * @param buf_size      Buffer size to be allocated. If the value is zero or 
     65 *                      negative, the port will use default buffer size (which 
     66 *                      is about 4KB). 
     67 * @param user_data     User data to be associated with the file writer port. 
     68 * @param p_port        Pointer to receive the file port instance. 
     69 * 
     70 * @return              PJ_SUCCESS on success. 
     71 */ 
     72PJ_DECL(pj_status_t) pjmedia_file_writer_port_create( pj_pool_t *pool, 
     73                                                      const char *filename, 
     74                                                      unsigned sampling_rate, 
     75                                                      unsigned channel_count, 
     76                                                      unsigned samples_per_frame, 
     77                                                      unsigned bits_per_sample, 
     78                                                      unsigned flags, 
     79                                                      pj_ssize_t buff_size, 
     80                                                      void *user_data, 
     81                                                      pjmedia_port **p_port ); 
     82 
     83 
     84 
     85 
    4486PJ_END_DECL 
    4587 
Note: See TracChangeset for help on using the changeset viewer.