- 博客(9)
- 资源 (7)
- 收藏
- 关注
转载 alsa capture
/**** configures it for stereo,16 bit,44.1kHz,interleaved access ***/#include "capture.h"int capture_period(){ int err;snd_pcm_t *capture_handle;snd_pcm_hw_params_t *h
2015-03-31 23:27:03 641
转载 ALSA 学习
A Tutorial on Using the ALSA Audio APIThis document attempts to provide an introduction to the ALSA Audio API. It is not a complete reference manual for the API, and it does not cover many specific
2015-03-31 23:02:57 571
原创 RTP 简单的发送端程序和接收端程序
发送端/* * ===================================================================================== * * Filename: jrtp2.cpp * * Description: * * Version: 1.0 * Created
2015-03-28 16:17:56 1432
转载 多线程编程学习1
#include #include #include #include #define MAX 10pthread_t thread[2];pthread_mutex_t mut;int number=0,i;void *thread1(){ printf("thread1:I'm thread 1\n"); for(i=0;i<MAX;i++) { print
2015-03-27 22:27:03 243
原创 插入排序分析及优化
插入排序是一个简单的原址排序,对于少量的元素,这是一个有效的算法。也常用来对快排做元素较少时的优化选择。 伪代码描述: INSERTION-SORT(A) for j=2 to A.length key=A[j] i=j-1;
2015-03-25 20:33:10 312
原创 List 的简单实现 c++11
/*************List*******************class List{}method:List():List(const List &rhs)~List()const List &operator=(const List &rhs)List(List &&rhs)List &operator=(List &&rhs)int size() const:b
2015-03-25 19:34:44 541
原创 Vector 的简单实现 C++11
/**********class templates Vector************* int size() const: return the numbers of elements in the container void clear(): removes all elements
2015-03-24 23:03:22 493
原创 算法导论—归并merge排序
#include #include #include using namespace std;void Merge(vector &vec,size_t p,size_t q,size_t r){ auto n1=q-p+1; auto n2=r-q; vector lhs(n1+1); vector rhs(n2+1); for(int i=0;i<n1;++i)
2015-03-17 20:51:15 529
原创 算法导论—排序—插入排序
下标 j 指出正被插入到手中的“当前牌”,在for 循环的每次迭代的开始,包含元素1—j-1 的子数组构成了当前排序好的牌,j+1—n为仍在桌上的牌。该排序主要的思想是将排序好的每个逆序与当前要排序的进行相比,若大于则向前移一位。。。#include #include using namespace std;void insertSort(vector &vec)
2015-03-17 14:23:25 272
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人