⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.c.svn-base

📁 本驱动是 s3c2410 声卡驱动,实现了 mp3,wav格式的音频文件的播放 
💻 SVN-BASE
字号:
#include "config.h"
#include "lib.h"
#include <stdio.h>

int main()
{
	char *where = (char *)0x31000000;

	init_uart();
	printf("\nPlease send a uuencoded wave file\n");
  
  if(xmodem(where) <= 0) 
	{
		printf("...Receive fail!\n");
	  goto halt;
	}

  if(uudecode(where) <= 0)
	{
		printf("... decode fail!\n");
	  goto halt;
	}
	
	struct WAVE *hdr = (struct WAVE *)where;
	int *p = (int *)(where+sizeof(struct WAVE));
  
  init_uda1341ts(Play);
  wav_play(hdr,p);

  printf("End playing.\n");

halt:
	printf("System halted.\n");
  while(1);
  
  return 0;
  
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -