2. The equation $(a-1)(\sin 2 x+\cos x)+(a+1) \cdot$ $(\sin x-\cos 2 x)=0$ (parameter $a<0$) has $(\quad)$ solutions in the interval $(-\pi$, $\pi)$.
(A) 2
(B) 3
(C) 4
(D) 5 or more than 5
2.C.

The original equation can be transformed into
$$
\sin \left(\frac{x}{2}+\frac{\pi}{4}\right)\left[\cos \left(\frac{3 x}{2}-\frac{\pi}{4}\right)+\frac{a+1}{a-1} \sin \left(\frac{3 x}{2}-\frac{\pi}{4}\right)\right]=0 \text {. }
$$
(1) The equation $\sin \left(\frac{x}{2}+\frac{\pi}{4}\right)=0$ has a solution $x=-\frac{\pi}{2}$ in the interval $(-\pi, \pi)$.
(2) For the equation
$$
\cos \left(\frac{3 x}{2}-\frac{\pi}{4}\right)+\frac{a+1}{a-1} \sin \left(\frac{3 x}{2}-\frac{\pi}{4}\right)=0,
$$

when $a=-1$, it becomes $\cos \left(\frac{3 x}{2}-\frac{\pi}{4}\right)=0$, yielding
$$
x=-\frac{5 \pi}{6},-\frac{\pi}{6}, \frac{\pi}{2} ;
$$

when $a \neq-1$, it can be transformed into
$$
\tan \left(\frac{3 x}{2}-\frac{\pi}{4}\right)=\frac{1-a}{a+1} \text {. }
$$

Furthermore, when $a<0$ and $a \neq-1$,
$$
\frac{a-1}{a+1} \in(-\infty,-1) \cup(1,+\infty) \text {. }
$$

Since $y=\tan \left(\frac{3 x}{2}-\frac{\pi}{4}\right)$ has 3 periods in $(-\pi, \pi)$, from the graph we can see that the equation (1) always has 3 solutions, and none of them is $-\frac{\pi}{2}$.
Therefore, when $a<0$, the original equation has 4 solutions.